Find and Replace Text in 1 or More Files Using Vim, fzf and ripgrep

preview_player
Показать описание
We'll cover a bunch of find / replace use cases (even regular expressions).

Hit the subscribe button to receive more videos like this!

---

Timestamps:

0:00 -- What we'll cover in this video
0:55 -- Cloning an example project to work with
1:43 -- Finding or jumping to a word on a single line
3:25 -- Finding a term in the current file
4:57 -- Automatically clearing search highlights on cursor move
6:37 -- Manually replacing text in the current file
7:33 -- Using the star mapping to search a word under your cursor
7:54 -- Replacing the last searched word using a custom mapping
10:45 -- Using the visual star plugin to search for any selected term
11:59 -- Replacing any selected term using a custom mapping
13:31 -- Replacing text inside of a visual selection
14:48 -- A multiple cursors alternative in Vim
18:28 -- Custom key mapping to quickly replace near by text
19:53 -- Finding terms in multiple files based on where you opened Vim
21:33 -- Opening search results in vsplits, splits or tabs
22:42 -- Opening multiple search results at once
23:22 -- Seeing real time search results when finding text in multiple files
24:02 -- Filtering multiple file search results by file type
26:50 -- Installing and configuring fzf
32:41 -- Finding and replacing text in multiple files with vim-grepper
35:42 -- Finding and replacing a phrase or regexp in multiple files
39:15 -- Installing and configuring the vim-grepper plugin
40:48 -- Running vim-grepper manually for more complex find / replace

---

Follow along?

Рекомендации по теме
Комментарии
Автор

Here's the time stamps since this is a long one:


0:55 -- Cloning an example project to work with
1:43 -- Finding or jumping to a word on a single line
3:25 -- Finding a term in the current file
4:57 -- Automatically clearing search highlights on cursor move
6:37 -- Manually replacing text in the current file
7:33 -- Using the star mapping to search a word under your cursor
7:54 -- Replacing the last searched word using a custom mapping
10:45 -- Using the visual star plugin to search for any selected term
11:59 -- Replacing any selected term using a custom mapping
13:31 -- Replacing text inside of a visual selection
14:48 -- A multiple cursors alternative in Vim
18:28 -- Custom key mapping to quickly replace near by text
19:53 -- Finding terms in multiple files based on where you opened Vim
21:33 -- Opening search results in vsplits, splits or tabs
22:42 -- Opening multiple search results at once
23:22 -- Seeing real time search results when finding text in multiple files
24:02 -- Filtering multiple file search results by file type
24:48 -- Finding files, viewing git commits and more with the fzf.vim plugin
26:50 -- Installing and configuring fzf
28:26 -- Installing and configuring fzf.vim
30:26 -- Installing and configuring ripgrep to work with fzf and fzf.vim
32:41 -- Finding and replacing text in multiple files with vim-grepper
35:42 -- Finding and replacing a phrase or regexp in multiple files
39:15 -- Installing and configuring the vim-grepper plugin
40:48 -- Running vim-grepper manually for more complex find / replace

NickJanetakis
Автор

is a crazy video. search and replace in vim have been bothered me a lot and you just saved me on this. I love you Nick. I will visit your youtube and learn more about vim. thank you so

JJ-wtym
Автор

This is awesome. This is exacly what I and probably every other vimmer needs

paweczajka
Автор

This was imensely helpful, Thank You!

sillaceestekay
Автор

This video is exactly what I was looking for. Thanks!!

lpanebr
Автор

06:55 I mapped my esc key in normal mode to clear the highlighted search:
nnoremap <esc> :noh<return><esc>

MohamedSaleh
Автор

Great video, thank you! I also think it would be great if vim-grepper was not necessary and we could do the same thing with fzf rg. Rg is pretty powerful, I imagine there is a way, I just haven’t figured it out yet.

dave
Автор

at 12:44 you say using the asterisk sign (*) on a visual selection requires a plugin. works without it for me though. maybe it's available in a new version or something..

Great videos. thanks! I learned some cool new stuff from you.

YuvalHelman
Автор

This is a pretty iseful video atleast for Vim begginers like me, I suggest you to use a more compressed video format in 20 or 10 instead of 40 minutes, you covered a lot of useful stuff in this guide, but i think i t could be done, anyways thanks for this, you really helped me a lot.

NoPudieronConGuevara
Автор

How did you apply gruvbox theme to terminal and tmux?

saichandneeli
Автор

I really like far. It's interactive so you can actually see what is going to change before you apply, and exclude items if you need. Really cool shit.

Zeioth
Автор

Thanks, Nick! Very interesting material as always. One thing is bothering me when I need to do things with vim is replacing strings full of special symbols. That is a real pain for me, I just want to replace these strings as I do for example in VSCode, where I don't care about how many special symbols in my strings or how to escape them. How do you deal with that?

nnutipa
Автор

which key combination is pressed in 33:18?

rafkhachatryan
Автор

Hi Nick, thanks for this awesome video. It would be great if you can provide .vimrc/init.vim used in this video in some repo or something.

snk
Автор

Nick please help. Copied your dotfiles but when trying to use ctrl-v with Rg it pastes from clipboard in the field instead of opening the file in a vertical split. I don't know why.

TheStringKing
Автор

Hi, has anyone had performance issues with wsl, like it seems to load processes very slow as you use it more?

kez
Автор

32:43 <- Search and replace multiple files

bobii
Автор

how'd you get blatant spam onto the front page of slashdot, and why did you feel it was necessary to do so? regards.

linuxgeek
Автор

Goo info but you are diverting a lot of the topic and the video is super long. It would be great if you just show how to do multiple replace in like 10 minutes, instead of trying to cover unrelated/slightly related things in detail.

subhadeepsamantaray