Skip to content

mohitlakde/SF-Code-Snippet

Repository files navigation

SF-Snippet README

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.

Features

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)

    FOR APEX CODE
  • 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.

    FOR JS CODE
  • 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.

    FOR HTML CODE
  • 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.

    FOR XML CODE
  • 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.

Shortcuts

Apex Shortcuts
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
JS Shortcuts
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
HTML Shortcuts
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
XML Shortcuts
Prefix Description
targets Target Config : Target Tag
targetConfig Target Config : Design Attributes

Enjoy!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published