New answers tagged

1

OK, got it. Was using wrong sigil. Instead of "+ you need @+. So: inoremap <Leader>gg [<esc>:silent !~/bin/copy_safari_title.osa <cr>:let @+ = substitute(@+, '\|', '', 'g')<cr>"+pa](<esc>:silent !~/bin/copy_safari_url.osa <cr>"+pa)


3

There is plugin for this - Abolish by Tim Pope. No configuration required. For your example do one of these commands (does not matter which): :Subvert;USERS;USER_ITEMS;g :Subvert;users;user_items;g


2

It's possible to do this with one substitution command but it's a bit hairy and you might want to just use two substitutions. For instance here's a two substitution version that has a bit of a shortcut in it... :s/\(user\)s\?/\1_items/gI | s/\(USER\)S\?/\U~/g The ~ in the replacement part of the second command copies the replacement of the last executed ...


3

Yes. You can store the list of Ex commands to a file and then use the :source command to execute the commands in the file. By convention, you would save the commands to a file using the *.vim extension. That will also get Vim to help you with proper syntax highlighting, automatic indentation, etc. for the vim filetype. If you store the file under the ~/.vim ...


Top 50 recent answers are included