Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Salesforce LWC Short KeysNew to Visual Studio Code? Get it now.
Salesforce LWC Short Keys

Salesforce LWC Short Keys

nisar-ahmad

|
58,945 installs
| (5) | Free
LWC/JavaScript ES6-11 Code Snippets
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Support for Salesforce LWC snippets (shortcut key)

version installs Generic badge Generic badge Generic badge Generic badge

This extension contains code snippets (shortcut keys) for salesforce Lightning Design System and JavaScript in ES6 syntax for Vs Code editor (supports HTML, JavaScript and XML).

demo


Lightning Design System

Trigger Component Type Language Content
lwc: LWC Lightning HTML lwc:button, lwc:input, lwc:layout, lwc:iteration...
slds: Aura & LWC SLDS HTML slds:modal, slds:table, slds:select...
lwc: LWC Configuration tags XML lwc:target, lwc:target-community, lwc:design...

LWC modules in JavaScript

Trigger Content
imp: Import module : uiObjectInfoApi, navigation, toastEvent, pub-sub, apexClass...
met: Import standard functions constructor, connectedCallback, renderedCallback...
wire: wire method ( parametric / nonParametric ) and Message Channel
apex: apex imperative method ( parametric / nonParametric )
msgChl: Lightning message service’s function publish, subscribe, unsubscribe...
api: Add @api:getter-setter, @api:function...

JavaScript various methods ( ES6 support )

Trigger Content
c: Import console methods log, table, info...
arr: Import iterable (Array) function forEach, filter, forLoop, map...
object: Import Obejct function assign, hasOwnProperty, keys, values...
query: Add querySelector methods...
json: JSON.parse, JSON.stringify...
evt: dataSet, stopPropagation, preventDefault...
tcf: try catch statement try {} catch (error) {} finally {}
thenc: adds then and catch declaration to a promise .then((res) => {).catch((err) => {});
prom: creates a new Promise return new Promise((resolve, reject) => {});

Note : All the snippets include the final semicolon ;

Enjoy ! Thank You

Created By : nisarahmad.ajmer@gmail.com

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft