I know VIM can start visual block selection with Ctrl+V, or sometimes Ctrl+V becomes pasting, we can still go with Ctrl+Q. But I think this key combination is not so easy to press, can I assign a customized key for this? For example, I would like to use q in normal mode to start visual selection (I don't use macro recording that much):
map q ???
<-- what should I write here?
Press v to begin character-based visual selection, or V to select whole lines, or Ctrl-v or Ctrl-q to select a block. Move the cursor to the end of the text to be cut/copied. While selecting text, you can perform searches and other advanced movement. Press d (delete) to cut, or y (yank) to copy.
In your terminal, pressing <c-q> will sent stty start signal. This is important when you first stop your terminal output scrolling(by ctrl-s ), and then you want to resume. That is, in terminal vim, if you pressed C-q , it will be captured first by terminal.
While you are inside a visual mode, you can switch to another visual mode by pressing either v , V , or Ctrl-v . For example, if you're in line-wise visual mode and you want to switch to block-wise visual mode, just type Ctrl-v . Try it! This will start visual mode on the same selected area as the last visual mode.
I believe you're looking for
:nnoremap q <c-v>
But note that you won't be able to record macros unless you remap that too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With