3 ms·
As seen in the animations, you can select multiple random places and insert text simultaneously which, having used vim for over a decade, I do not know how to d
by nurettin 10y ago
As seen in the animations, you can select multiple random places and insert text simultaneously which, having used vim for over a decade, I do not know how to do.
- graphememes 10y agoMultiple cursor plugin adds the "select random places" which there are more powerful ways to do this in vim specifically search/replace or edit + n + .. will get what you want using a simple search query.
- nurettin 10y agoSaid functionality just isn't supported as readily and intuitively out of the box as a graphical editor with a mouse. I am not afraid to admit that this is the nature of terminal editors.
- graphememes 10y agoIt most certainly is, there is just a plugin to do the behavior exactly how you want to do it, which in my opinion after learning other ways is much slower.
- 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.