SF Snippet is the library which Salesforce Developers can use to speed up their development. Typing prefixes can load the entire command/syntax on editor.
SF Snippet can load most comman commands and code which you use day to day as a developer. With every minimum configuration, you can start using this.
STEPS TO IMPORT SCRIPTS
-
Download Project from GitHub to your local machine.
-
Navigate to classes folder in project. (You need to copy and paste code from these files)
-
Open Visual Studio Code --> Preferences --> User Snippets --> Select "New Global Snippets File" and provide name "ApexCode" and hit enter.
-
Copy text from apexCode file from downloaded folder to newly created file.
-
Open Visual Studio Code --> Preferences --> User Snippets --> Select "New Global Snippets File" and provide name "javascriptCode" and hit enter.
-
Copy text from "javascriptCode" file from downloaded folder to newly created file.
-
Open Visual Studio Code --> Preferences --> User Snippets --> Select "New Global Snippets File" and provide name "htmlCode" and hit enter.
-
Copy text from "htmlCode" file from downloaded folder to newly created file.
-
Open Visual Studio Code --> Preferences --> User Snippets --> Select "New Global Snippets File" and provide name "xmlCode" and hit enter.
-
Copy text from "xmlCode" file from downloaded folder to newly created file.
Prefix | Description |
---|---|
pub | Create Public Class |
pri | Create Private Class |
armc | Creates an Aura enabled method :cacheable |
arm | Creates an Aura enabled method |
arp | Creates an Aura enabled property |
sys | System debug |
com | Method level comments |
clscom | Class level comments |
lst | List of String |
set | Set of String |
map | Map of String |
for | for Loop |
if | if Statement |
ifelse | if else Statement |
soql | SOQL query assignment to List variable |
Prefix | Description |
---|---|
clg | Log output to console |
cle | Log output to console |
clc | Log output to console |
func | Log output to console |
imap | Import Apex |
imcl | Import Custom Label |
imsr | Import Static Resource |
wrmt | Wire method code |
Prefix | Description |
---|---|
temt | template true Condition |
temf | template false Condition |
fore | template for each |
ite | template for each: Iterator |
lgin | lightning input |
lgic | lightning icon |
lgicon | lightning button icon |
lgbutton | Button Brand |
Prefix | Description |
---|---|
targets | Target Config : Target Tag |
targetConfig | Target Config : Design Attributes |
Enjoy!