3 ms·
/{oldtext}<CR>cgn{newtext}<Esc>... Where each . is for each repetition - text won't be inserted simultaneously, but you hit . (or skip over one search match wi
by OJFord 10y ago
/{oldtext}<CR>cgn{newtext}<Esc>...
Where each . is for each repetition - text won't be inserted simultaneously, but you hit . (or skip over one search match with n) instead of the initial Cmd+click+mousemove+click+mousemove+click in a GUI editor.
You probably also want in your vimrc:
nnoremap <esc> :nohlsearch<CR><esc>
set hlsearch
in order to highlight search terms (so you know if you want to apply with . or skip over one with n) and <Esc> to clear highlighting.
- OJFord 10y agoThere's also terryma/vim-multiple-cursors if you really want to edit all locations simultaneously.