Quantcast
Channel: Active questions tagged keymapping - Stack Overflow
Viewing all articles
Browse latest Browse all 74

How to make key vim keybinding in vscode be mode dependent

$
0
0

For example I've added

{        // Debug -> Step Over"before": ["o"],"when": "inDebugMode","commands": [            {"command": "workbench.action.debug.stepOver",            }        ]    }

So that I can press o when debugging and step over. ( My F5 key is broken 🤷 ). However when in non debug mode I want it to do the standard o operation

I've tried

{    // Debug -> Step Over"before": ["o"],"commands": [        {"command": "workbench.action.debug.stepOver","when": "inDebugMode && editorTextFocus && debugState == 'stopped'"        },        {"command": "editor.action.insertLineAfter","when": "!inDebugMode"        }    ]}

but it almost seems like the when clause doesn't work at all because it steps overandinserts a new line

🤔 Though when reading the doc again at https://github.com/VSCodeVim/Vim I may have been mistaken in thinking there is a when clause. The when clause is available for normal vscode chorded keybindings but not for vim sequential keybindings.


Viewing all articles
Browse latest Browse all 74

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>