4

I'm using multiple cursors plugin.

I'm trying to do the same thing as the second example in their github page. Just trying to add double quote around each of the weekday:

mon
tue
wed
thu
fri
sat
sun

I can add one double quote at the beginning of each line by creating a visual block with c-v and press "ctrl-n" to enter multiple cursors. But when I press <esc> to escape insertion mode, I lost all the cursors. Then I have to do all over again just to resume the multiple cursors and append a double quote on each line.

Is there some easy way to do that? Am I doing it stupidly? Why in the example, the screenshot shows the cursors are not lost?

  • In visual block mode you can press I to insert for every row and A to append for every row. – Sukima Apr 1 '15 at 19:01
6

Try adding the following to your .vimrc:

let g:multi_cursor_exit_from_insert_mode = 0

From :help multiple-cursors-global-options:

g:multi_cursor_exit_from_insert_mode (Default: 1)

If set to 0, then pressing |g:multi_cursor_quit_key| in Insert mode will not quit and delete all existing cursors. This is useful if you want to press Escape and go back to Normal mode, and still be able to operate on all the cursors.

| improve this answer | |
  • So you'd need to hit ESC while in normal mode to exit the multi cursor? – TankorSmash Apr 2 '15 at 18:13

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.