codemirror / codemirror5

In-browser code editor (version 5, legacy)
http://codemirror.net/5/
MIT License
26.77k stars 4.96k forks source link

with vim bindings `s` in visual-block mode doesn't behave like in vim #3831

Closed pseyfert closed 8 years ago

pseyfert commented 8 years ago

Essentially this issue is moved from lambdalisue/jupyter-vim-binding#50 the s key in visual-block mode doesn't behave as expected.

marking text in a cell in visual block mode with ctrl+v does allow to delete the text with d and one can insert text at the beginning of the marked section with shift+i, but in vim also s works with visual block mode - it deletes the marked part and switches to insert mode to insert text in all marked lines. For me, jupyter-vim-bindings only enter the text in the first marked line.

A small demonstration here: http://virgilio.mib.infn.it/~seyfert/videos/visual-block-s.webm

what I do there is in both cases:

  • switch to visual-block mode with ctrl+v
  • mark the "wr" part
  • hit s
  • type "td[esc]j"

I can observe the same behaviour on https://codemirror.net/demo/vim.html I'm using google-chrome 48.0.2564.109 (64-bit)

acornejo commented 8 years ago

FWIW you can use the c key for the same effect, and that one does work in codemirror (and vim).

pseyfert commented 8 years ago

Thanks for the pointer!

marijnh commented 8 years ago

Fixed via #3868