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

Conflicting with suggestions

Open NeoFantom opened this issue 6 years ago • 3 comments

Sometimes I need to use word suggestions provided by vscode. But I have to commit the suggested word with tab or enter. Problem is: when I'm in table mode, both tab and enter has cell-ralated functions which overrides the default suggestion-commiting. How to make this work for me? Below is a gif of what happens after I press enter: cannotCommitSuggestion

NeoFantom avatar Sep 08 '19 08:09 NeoFantom

Hi @NeoFantom,

You could try to remap keys a bit.

{ "key": "tab", "command": "-text-tables.gotoNextCell", "when": "tableMode" },
{ "key": "tab", "command": "text-tables.gotoNextCell", "when": "tableMode && !suggestWidgetVisible" },
{ "key": "enter", "command": "-text-tables.nextRow", "when": "tableMode" },
{ "key": "enter", "command": "text-tables.nextRow", "when": "tableMode && !suggestWidgetVisible" }

These lines remove Tab and Enter bindings that extension brings and map them back with additional when clause. After you apply this settings in your keybindings file, Tab and Enter will have default behavior when suggestions list is visible.

rpeshkov avatar Sep 08 '19 22:09 rpeshkov

Perfect solution! Can't stress enough how grateful I am!

NeoFantom avatar Sep 09 '19 00:09 NeoFantom

Glad that it helped you. I guess I will make changes into keybinding of extension so that this behavior will be default.

rpeshkov avatar Sep 09 '19 08:09 rpeshkov