eugen0329 / vim-esearch

Perform search in files easily
352 stars 12 forks source link

Shortcut for `:s/<search-pattern>/...` and `:g/<search-pattern>/....` #208

Open IndianBoy42 opened 1 year ago

IndianBoy42 commented 1 year ago

I love the "just edit as if its a normal buffer" approach to search and replace, its a lot more powerful and flexible. But sometimes I really just want :%s///g but across all files. Afaict (please correct me if im wrong im new to this plugin) the way to do that with esearch would be to do the search, and then in the result buffer i'd have to retype the pattern into the substitute or g command.

Another possibly preferable alternative could be a way to make cim<replacement> apply to all the matches simultaneously, or any operator. This holds with the principle of doing replacements by editing the buffer.

A vim-visual-multi integration that automatically adds cursor/regions to all matches could also be quite useful, but a way to simplify editing all matches even without vim-visual-multi might be worth it