3

I am running Vim version 8.0.563 on Solaris and when I run Vim, the CtrlV block selection works as expected, I type ^V and move the cursor and a block of text is highlighted by columns. So far, so good.

Meanwhile, for another user running Vim from my directory with my .vimrc file, this does not work. The ^V is ignored and moving the cursor, moves the cursor but nothing is highlighted. Regular v, block mode works but the ^V column block mode is broken.

I tried entering:

vim --noplugin -u /dev/null

and it acts the same. I checked the shared libraries and they are the same. I tried clearing out (almost) all the environment variables, still no joy.

Does anybody have any good ideas of what is wrong or something else to try?

Thank you in advance.

10
  • Or would I do well to repost this over in the VI/VIM area? There are lots of VIM questions here but nobody has commented. If I ask a C question, I get answers in seconds. I guess I'll wait a few days and see how it goes. Apr 21 '17 at 20:55
  • Does the ctrl-v alternative ctrl-q work? See :help ctrl-v-alterantive.
    – Habi
    Apr 22 '17 at 12:55
  • I have the same thing happening. Neither Ctrl-V or Ctrl-Q work
    – Bob Bryan
    Apr 22 '17 at 23:06
  • 1
    Are you sure it is not working or is it perhaps just not displaying the highlighting correct? Apr 25 '17 at 6:26
  • 1
    Could it be the terminal intercepting the "ctrl-v"? Can you try "CTRL-V" "CTRL-V"? Apr 25 '17 at 18:25
2

I had the same problem when working in the windows terminal via Windows Subsystem for Linux (WSL). Some searching learned me that the problem is caused by the fact that CTRL-V is used for pasting. The solution for me was to add:

nnoremap q <c-v>

to my .vimrc Then you can use the q-key to get into visual block mode.

4
  • I noticed the same in Windows Terminal, because it intercepts the ctrl-V and pastes from the clipboard. My work-around is to use ` {"command": "paste", "keys": ["ctrl+shift+insert"]},` in the config Oct 19 '20 at 14:40
  • 2
    Welcome to Vi and Vim! Did <C-q> not work for you? (:help CTRL-V-alternative)
    – D. Ben Knoble
    Oct 19 '20 at 15:19
  • 1
    No, <C-q> does not work, unfortunately
    – mark79
    Oct 20 '20 at 19:48
  • Just a note that this hides the macro-recording key, which can be extremely useful.
    – D. Ben Knoble
    Oct 20 '20 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.