marimo icon indicating copy to clipboard operation
marimo copied to clipboard

Vim block select mode does not work

Open michaelsch71 opened this issue 1 year ago • 1 comments

Describe the bug

In vim, block selection mode can be entered by typing CTRL + V. Enabling vim mode in marimo, this command does not enter block selection mode, but rather puts the cursor to the last position in the current cell. It would be great to be able to use block selection mode.

Environment

{ "marimo": "0.4.2", "OS": "Darwin", "OS Version": "23.5.0", "Processor": "arm", "Python Version": "3.10.0", "Binaries": { "Browser": "125.0.6422.76", "Node": "--" }, "Requirements": { "click": "8.1.6", "importlib-resources": "6.1.1", "jedi": "0.19.1", "markdown": "3.6", "pymdown-extensions": "10.8", "pygments": "2.17.2", "tomlkit": "0.12.4", "uvicorn": "0.29.0", "starlette": "0.37.2", "websocket": "missing", "typing-extensions": "4.9.0", "black": "24.4.0" } }

Code to reproduce

No response

michaelsch71 avatar May 24 '24 13:05 michaelsch71

We use https://github.com/replit/codemirror-vim - it is possible that this plugin does not support block-selection

mscolnick avatar Jun 04 '24 19:06 mscolnick

I've run into this issue as well; it looks like that plugin does in fact support visual-block selection: https://github.com/replit/codemirror-vim/blob/59c44ef2909506836bb1fd2f81c738e35b29a4aa/src/vim.js#L215

anjiro avatar Nov 19 '24 10:11 anjiro

@anjiro great that you looked this up. It indeed does and also it supports block selection with CTRL + Q, which I just tried out and it works. Is it simply possible that marimo overwrites the CTRL + V shortcut? If possible, it would be great if that could be turned off, for example as a user setting

michaelsch71 avatar Nov 19 '24 10:11 michaelsch71

@anjiro, @michaelsch71 thank you for investigating. I don't see that we override ctrl-v anywhere specifically, but it could be from a plugin. I can investigate and try to give Vim precedence

mscolnick avatar Nov 19 '24 13:11 mscolnick

Thanks a lot. Works like a charm ❤

michaelsch71 avatar Jan 10 '25 10:01 michaelsch71

Unfortunately, this stopped working again in recent versions.

michaelsch71 avatar Feb 25 '25 06:02 michaelsch71

@michaelsch71 - what version are you on? i think this was regressed and then added back

mscolnick avatar Feb 25 '25 17:02 mscolnick

Thanks! I was on 0.11.0. I just upgraded to 0.11.9 and there it works again nicely.

michaelsch71 avatar Feb 26 '25 06:02 michaelsch71