vimrc icon indicating copy to clipboard operation
vimrc copied to clipboard

vim-multiple-cursors not working

Open sdtemp opened this issue 8 years ago • 7 comments

The plugin does not seem to be working,..

I tried installing the plugin manually as well, and did not succeed. I am not getting any errors so I don't know how to proceed.

sdtemp avatar Sep 04 '18 20:09 sdtemp

Can confirm, <Ctr l+ S> hangs the vim session

frzkn avatar Sep 05 '18 05:09 frzkn

Ctrl+S is a shell shortcut to freeze the buffer (for fast input, for example). To unfreeze it there is the shortcut Ctrl+Q.

There is a closed issue where there is a comment to disable this functionality and use the default mapping for multiple cursors:

issuecomment-349465982

yeboster avatar Oct 08 '18 14:10 yeboster

Can confirm, <Ctr l+ S> hangs the vim session

same here

jayrexacilo avatar Oct 19 '18 06:10 jayrexacilo

Same.

dessalines avatar Feb 20 '19 17:02 dessalines

It might be a good idea to change this shortcut to something else instead of CTRL+S, or at least add a note in the README that CTRL+S is a shell shortcut to freeze the buffer.

If you're on Ubuntu, you can add stty -ixo to the end of your ~/.bashrc file. That will disable the buffer freezing functionality and allow you to use CTRL+S for multiple cursors again.

Alternatively, you can re-map the keys by placing the following in your "/.vim_runtime/my_configs.vim" file (create it if it doesn't exist):

let g:multi_cursor_use_default_mapping=0

" Default mapping
let g:multi_cursor_start_word_key      = '<C-n>'
let g:multi_cursor_select_all_word_key = '<A-n>'
let g:multi_cursor_start_key           = 'g<C-n>'
let g:multi_cursor_select_all_key      = 'g<A-n>'
let g:multi_cursor_next_key            = '<C-n>'
let g:multi_cursor_prev_key            = '<C-p>'
let g:multi_cursor_skip_key            = '<C-x>'
let g:multi_cursor_quit_key            = '<Esc>'

Just change all the <C-n> commands to something else.

trevinwong avatar Mar 23 '19 18:03 trevinwong

If you're on Ubuntu, you can add stty -ixo to the end of your ~/.bashrc file. That will disable the buffer freezing functionality and allow you to use CTRL+S for multiple cursors again.

I tried to add stty -ixo but it throws an error (Bionic Beaver 18.04). The options now seem to be stty -ixon and stty -ixoff (see man stty).

After trying both options, ssty -ixon worked, and I am using multiple cursors successfully in vim with CTRL+S.

majamin avatar Nov 26 '19 22:11 majamin

This seems to be more an issue of the environment than of this vimrc.

Like @terbb notes, you can remap keys to resolve this issue.

amix avatar Nov 30 '19 18:11 amix