sundar
sundar

Reputation: 389

Visual mode in gVim on Windows doesn't work the way as it works in Unix

I'm using gVim version 7.3 on my Windows. When using gVim in my Unix, to insert a common text at the beginning of each line in a file, I do the following steps:

  1. Enter visual mode (CTRL+V).
  2. Select the lines for which the text has to be inserted at the beginning using arrow keys or hjkl keys.
  3. After selection press Shift+I.
  4. The cursor goes to the begin of the line where I started. I enter some text and press ESC key.
  5. Now the entire block of lines has the text inserted at the beginning.

So here's my question. How do I do the same thing in my gVim on Windows? It's not working if I follow the above as on Unix. Could someone please help me out with this?

Upvotes: 10

Views: 8082

Answers (1)

Prince Goulash
Prince Goulash

Reputation: 15715

If you have behave mswin in your vimrc then some of the Vim mappings are modified to be more "Windows-like". In particular you will need to use <CTRL-Q> to enter block-visual mode.

I have behave xterm in my Windows vimrc which eliminates these issues.

Upvotes: 15

Related Questions