Custom VS Code Snippets

What Are These?

VS code has the ability to have custom code snippets. This page displays some that I have made. I will update it as I make more.

How to use these

These snippets should work on any os.

  • Go to File > Preferences > Configure Snippets
  • Type in the language that the snippet is for
  • Copy and paste in between the curly braces
  • Save the file and close it

Some Helpful Resources

Here are some resources that helped me write these.

Snippet Library

C++

Doc Comment Block

This creates a doc comment for functions. Just type out docComment and press enter

"Doc Comment Block": {
"prefix": "docComment",
		"body":[
			"/*****************************************************",
			"* Function Name: ",
			"* Purpose: ",
			"* Arguements: ",
			"* Returns: ",
			"******************************************************/"
		],
		"description": "Makes the doc comment for C++ Functions"
	}

Top of File Comment

This creates the comment to go on the top of the file. This is used alot in programming classes. Just type titleBlockComment and press enter.

"Title Comment Block":{
		"prefix": "titleBlockComment",
		"body":[ 
			"/*****************************************************",
			"* Author: ",
			"* Date: ${CURRENT_MONTH}/${CURRENT_DATE}/${CURRENT_YEAR}",
			"* Filename: ${TM_FILENAME} ",
			"* Purpose: ",
			"******************************************************/"
		],
		"description": "The top comment for a C++ file"
	}