Last active
November 18, 2020 11:06
-
-
Save Nekodigi/b2e574ae043a59391f8311daa746397c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Place your snippets for java here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
"Println to console": { | |
"prefix": "pln", | |
"body": [ | |
"System.out.println(\"${1:string}\");$2" | |
], | |
"description": "println output to console" | |
} | |
,"Print to console": { | |
"prefix": "pri", | |
"body": [ | |
"System.out.print(\"${1:string}\");$2" | |
], | |
"description": "print output to console" | |
} | |
,"Scanner Import": { | |
"prefix": ["scam"], | |
"body": ["import java.util.Scanner;"], | |
"description": "Scanner import" | |
} | |
,"Int initialize": { | |
"prefix": ["inti"], | |
"body": ["int ${1:x} = 0;$0"], | |
"description": "Scanner import" | |
} | |
,"Scanner Setup": { | |
"prefix": ["scas"], | |
"body": ["Scanner sc = new Scanner(System.in);"], | |
"description": "Scanner setup" | |
} | |
,"Define array": { | |
"prefix": "intar", | |
"body": [ | |
"int ${1:var} = new int[${2:size}];$0" | |
], | |
"description": "print output to console" | |
} | |
,"Scanner nextInt with guide": { | |
"prefix": ["scapi"], | |
"body": ["System.out.print(\"${1:x} = \");", | |
"int ${1:x} = sc.nextInt();$0"], | |
"description": "Scanner nextInt with guide" | |
} | |
, | |
"For Loop Increment": { | |
"prefix": ["fori"], | |
"body": ["for (int ${2:i}=0; ${2:i}<${1:max}; ${2:i}++) {", "\t$0", "}"], | |
"description": "A for loop increment." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment