I am using visual studio code IDE for my Java project and I want to create a shortcut for:
System.out.println();
That is if I write sysout
or something like that it will automatically changed to System.out.println();
with cursor inside parenthesis.
Is there any way it can be achieved in VScode?
There is no need to define the snippet yourself. You can install https://marketplace.visualstudio.com/items?itemName=redhat.java, which contains the predefined snippet for your case (and more than that), here are some screenshot:
sysout:
syserr:
and even systrace:
If you want to developing your Java application in VS Code, you can also install https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack, which provides debugging, testing, project managing capabilities to you.