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

Опубликовано: 29 Сентябрь 2024
на канале: Nick Janetakis
24,765
511

We'll cover a bunch of find / replace use cases (even regular expressions).

Hit the subscribe button to receive more videos like this!

---

- https://github.com/nickjj/dotfiles
- https://github.com/haya14busa/is.vim
- https://github.com/nelstrom/vim-visua...
- https://github.com/junegunn/fzf
- https://github.com/junegunn/fzf.vim
- https://github.com/BurntSushi/ripgrep
- https://github.com/mhinz/vim-grepper

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
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

---

Follow along?

Personal Website: https://nickjanetakis.com
Twitter:   / nickjanetakis