vscode-text-marker icon indicating copy to clipboard operation
vscode-text-marker copied to clipboard

Question: Why "goToNextHighlight" command will make VIM extension enter Visual mode, while "toggleHighlight" won't?

Open fiddleyuan opened this issue 4 years ago • 4 comments

I'm using VSCode + VIM extension, I like text marker very much. But I'm recently confused by the different behavior between "goToNextHighlight" command and "toggleHighlight" command. The first command (which I made keybinding) will make VIM extension enter Visual mode, but the second command won't.

I would expect "goToNextHighlight" command behave like what "toggleHighlight" command does, with regard to the VIM mode.

fiddleyuan avatar Feb 20 '21 11:02 fiddleyuan

BTW, let me explain a little more here. Once VIM enters Visual mode after invoking "goToNextHighlight" command, then I press "j" or "k" to navigate lines, it will select lines.

If this is expected behavior, any workaround can bypass this? Thanks

fiddleyuan avatar Feb 20 '21 11:02 fiddleyuan

Hi @fiddleyuan , thanks for raising this. I installed Vim extension and could reproduce the behaviour. Though I haven't been developing Text Marker specifically Vim extension in mind, this goToNextHighlight behaviour (i.e. go into the visual mode) is unexpected. I would like to see it staying on the same mode (if it was on command mode, stay on command mode. If it was insert mode, stay on insert mode).

ryu1kn avatar Mar 21 '21 00:03 ryu1kn

What is the operation Text Marker issues causing Vim extension to go visual mode?? 🤔

ryu1kn avatar Mar 21 '21 00:03 ryu1kn

My guess is that setting editor.selection here automatically triggers visual mode. The same happens when making a selection by dragging the cursor while clicked.

Perhaps a simple solution would be to just move the cursor without doing a highlight.

rcywongaa avatar Jun 27 '22 10:06 rcywongaa