globalreplace.vim : Prompted global search and replace
script karma |
Rating 11/10,
Downloaded by 632 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Chris Rummel |
|
script type |
utility |
|
description |
Instead of typing %s/foo/bar/gc every time you want to search and replace in a file simply call this function and get prompted for the text to find and what to replace it with.
I looked for something like this, but didn't find it, hope it's useful (my first, and admittedly unimpressive script)
p.s.
You might want to tack "I" onto the regexp to make it case sensitive, so it'll look like this:
execute "%s/".l:find."/".l:replace."/gcI"
|
|
install details |
Simply drop the script in your .vim/plugin directory
I mapped it as follows
map <Leader>gr :call MISC_GlobalReplace()<cr> |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.225.11.98
|