기술/개발 도구
VSCode) VSCode에서 JAVA System.out.println 단축키 사용하기
seungyoon
2021. 7. 19. 14:45
eclipse에서 System.out.println을 sout이라는 단축키로 등록해놓고 사용했었는데 vscode에서는 그게 안됐다.
그래서 구글링하다가 발견한 아주 편리한 플러그인을 소개한다.
Java System Out Println
Java System Out Println - Visual Studio Marketplace
Extension for Visual Studio Code - Help insert and remove System.out.println(*) statement
marketplace.visualstudio.com
vscode 사이드바에 있는 마켓플레이스에 들어가서 Java System Out Println을 검색하서 설치하면 간단히 사용할 수 있다.
사용법 (MacOS)
command + shift + L
을 누르면 System.out.println(""); 이 커서가 있는 위치에 자동으로 생성된다.
그리고 특정 변수를 드래그 한 뒤 위 명령어를 입력하면 해당 명령어를 프린트하는 코드가 자동생성된다.
example)
...
String example = "hello";
...
예시 코드의 example을 드래그 한 뒤 command+shift+L을 누르면 아래와 같은 코드가 자동생성된다.
System.out.println("example: " + example);
// >> hello
짱편해!