Search code examples
javavisual-studio-codenetbeanskey-bindings

Creating an Apache Netbeans macro in VS Code


I am trying to create a keyboard shortcut for VS Code that allows me to "paste" the line System.out.println(); and then leave my cursor in between the braces. I am used to using Netbeans, where you can type "sout" + "tab" and the line will be pasted. Is there a way to do this in VS Code using the the keybindings.json file?

Thanks in advance!


Solution

  • You don't need to add extra keybindings to achieve this. Actually when you type syso, there will be intellisense provided by Java Language Server that print standard out, then press Tab you will get code. Like the gif shows:

    enter image description here