I've been doing some digging, but can't seem to find a way to achieve a very similar functionality to that of Sublime's multi-line-select demonstrated by the giphy below:
yi"
) I thought a visual selection and running norm yi"
would do it, but it only captures the last line of the visual selection.
You can do these in Vim...
yanking within quotes over multiple lines
record a macro ( :let @a=''<cr>qq"Ayiw:let @A="\\n"<cr>j"
)
use the macro ( n@q
)
pasting a
into a new buffer ( :tabnew<cr>"ap
)
add colons to the beginnings of multiple lines ( <cv>njI:<esc>
)
add commas to the ends of multiple lines ( <cv>nj$A,<esc>
)
Maps and functions can also reduce the number of keystrokes for things.
eg nnoremap <leader>b :tabnew<cr>p
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.