Using FZF to Preview Text Files on the Command Line and within Vim

preview_player
Показать описание
We'll create a Shell alias to quickly fuzzy search files and preview them (with paging).

Hit the subscribe button to receive more videos like this!

REFERENCE LINKS
---------------------------------------------------

COURSES
---------------------------------------------------
Courses I've created that focus on web dev and deployment topics.

THE TOOLS I USE / GEAR
---------------------------------------------------

FOLLOW ME ELSEWHERE
---------------------------------------------------

TIMESTAMPS
---------------------------------------------------
0:00 -- Intro
0:08 -- I've made videos in the past about reverse searching your history with FZF
0:18 -- Running the FZF command on its own
0:37 -- Using the built in CTRL+t bind with FZF to fuzzy search files on the command line
0:57 -- Previewing files on the command line with FZF using less
1:59 -- Using different commands to preview files, such as head for the first 30 lines
2:24 -- Using bat to get syntax highlighting in your previewed files
4:06 -- Creating custom FZF binds to page through results and setting up a Shell alias
5:59 -- You can preview files with the FZF Vim plugin by default too
7:08 -- Recap and any questions?
Рекомендации по теме
Комментарии
Автор

I suspect the preview options is build with xargs command that's why there is this '{}', it's part of xargs syntax as it reads from the standard input and in this case splits the output of fzf and execute each line with the command you specified in preview

medkha
Автор

Fantastic, I've never use --bind with fzf, super helpful.

WaylonWalker
Автор

This is what tech YouTube should be like. If only

warrenhenning
Автор

Thanks Nick. It was cool hearing you on the Changelog

tomontheinternet
Автор

exactly what I was looking for, thanks

Redyf
Автор

FZF is great. I've been experimenting with telescope, with recently migrating to neovim 0.5 and a lua config.
I still use fzf on the command line though. I use it a lot to navigate directories with alt-c
The --bind is new to me, never thought I could page through the preview!

ricardokullock
Автор

How can I paste text into the preview prompt in vim? For example, type the :Files command. The preview window comes up and you can enter text for the file you want to search. How do you paste text into there? Ctrl-v and pasting from buffer not working

remacp
Автор

Thanks for this vid! Is there a way to enable the preview on the ctrl + T shortcut?

nraw_
Автор

Vim fzf :Files working well but the file preview not showing. How to solve it.

jayachandrank
Автор

Hi, great video. Is there any way in that you can edit the file, in the preview window? Without open it in a new tab. Greetings from Mexico.

saulalberto
Автор

Hello! o) Is there any tool on Linux, which can preview ANY kind of file like this? I mean pictures, config-files, videos, pdfs etc.. ? Something basic like Windows "Explorer" at least? I am using "Directory Opus" on Windows but need something similar on Linux. Honestly, setting up fzf to only preview plain text files is kind of last century to me, there is something else out there, please don't anybody say no! o)

ytbone