I use Autohotkey
to create keyboard macros (bindings) that can be quite useful. They do not seem to work inside the Visual Studio Code
editor. The same key binding that works inside, say, Notepad
, does not have any effect in the Visual Studio Code
editor.
Questions:
- Is there a way to fix this problem?
- Is there a better way to create and use key bindings under Visual Studio Code?
Have you tried one of these keymap VS Code extensions? Linking also this reference.
Most of these extensions have a preset menu of key bindings. I would like to use my own. VSCode
has snippets but they are a “language” with a version per language like Julia or Python. I would like something simpler: just cut and paste formatted text I have saved somewhere. A key binding would give access to it, for example,
mykeybinding;Space
The ;Space
combination would tell VSCode
to paste the code on the editor. The code would be someting like
for i in 1:n
println(i)
end
and I could modify it (if necessary) after pasted on the editor.