Skip to content

lebrande/snippets-misie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🐻 SNIPPETS-MISIE 🐻

Snippets list

typescriptreact

  • Function Component - funcom
  • Enhanced Function Component - enhfuncom
  • Connected Function Component - confuncom
  • Use Material Styles - usemuisty

typescript

  • Reducer - reducer
  • Use Material Styles - usemuisty

❗️ I just wanna use

  • In VSCode View -> Command Palette cmd + shift + P and type snippets. Choose option Preferences: Configure User Snippets:

VScode edit snippets command

  • Select language:

Choose code language from list

  • Now a <lang>.json has been opened. Paste code from according file in snippets folder.

Edit file view

  • Open a file which you want to use your snippet in and try to use prefix from one of them. In example below that's log.

Use a snippet

  • Done.

🤓 How to develop?

  • Place your snippets for any language you want according filename in snippets folder.
  • 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:

"Print to console": {
	"prefix": "log",
	"body": [
		"console.log('$1');",
		"$2"
	],
	"description": "Log output to console"
}

📣 Help section

❓ FAQ:

  • Q: Can I commit some code and create PR?
  • A: Yup.

About

VS Code snippets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published