4 ms·
Yes. I use normal select when: - I want to apply a regex to a specific area, e.g. a single function (vjjjjj:s/my_function/my_new_function/g<enter>) - I want
by nick0garvey 5y ago
Yes.
I use normal select when:
- I want to apply a regex to a specific area, e.g. a single function (vjjjjj:s/my_function/my_new_function/g<enter>)
- I want to cut some text and I don't want to count how many words out it is (vwwwwx)
I use block select when:
- I want to delete a section of fixed width formatted text (Vjjjlllx). Useful for manipulating logs with a fixed width prefix.
- I want to append text to the start of a line. (VjjjjjjI# <esc>). Useful for commenting out lines.
- CGamesPlay 5y agoYou're actually talking about visual and visual block (although V is visual line and <C-V> is visual block in your examples). Select is a weird mode where typing will overwrite your selection, similar to how it works in a modeless editor like notepad or the HTML textarea.
- nick0garvey 5y agoHuh, TIL. I'm amazed I've been using Vim for this long and there are entire modes I didn't know.
- dpacmittal 5y agoYou're talking about visual mode, select mode is entered by pressing gh in normal mode.