VS Code Snippets - auto-mate/CheatSheetWiki GitHub Wiki

VS Code Snippets (Contains favourit add in list)

Global - Created by you applicable to all languages unless scope declaration added.
Saved as .code-snippets. Create with "User Snippets" Menu then "New Global Snippets...".

Language Specific - Edit files as listed in "User Snippets" Menu

bat.json

Language Specific - Edit files as listed in "User Snippets" Menu {

	// Created by Andrew Harper
	// Simple Bat Snippets [Command names only] For Visual Studio Code 

	// Place your snippets for bat here. 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"
	// }

	"ASSOC": {"scope":"bat","prefix":"/ASSOC","body":["ASSOC"],"description":"Displays or modifies file extension associations."},
	"ATTRIB": {"scope":"bat","prefix":"/ATTRIB","body":["ATTRIB"],"description":"Displays or changes file attributes."},
	"BREAK": {"scope":"bat","prefix":"/BREAK","body":["BREAK"],"description":"Sets or clears extended CTRL+C checking."},
	"BCDEDIT": {"scope":"bat","prefix":"/BCDEDIT","body":["BCDEDIT"],"description":"Sets properties in boot database to control boot loading."},
	"CACLS": {"scope":"bat","prefix":"/CACLS","body":["CACLS"],"description":"Displays or modifies access control lists (ACLs) of files."},
	"CALL": {"scope":"bat","prefix":"/CALL","body":["CALL"],"description":"Calls one batch program from another."},
	"CD": {"scope":"bat","prefix":"/CD","body":["CD"],"description":"Displays the name of or changes the current directory."},
	"CHCP": {"scope":"bat","prefix":"/CHCP","body":["CHCP"],"description":"Displays or sets the active code page number."},
	"CHDIR": {"scope":"bat","prefix":"/CHDIR","body":["CHDIR"],"description":"Displays the name of or changes the current directory."},
	"CHKDSK": {"scope":"bat","prefix":"/CHKDSK","body":["CHKDSK"],"description":"Checks a disk and displays a status report."},
	"CHKNTFS": {"scope":"bat","prefix":"/CHKNTFS","body":["CHKNTFS"],"description":"Displays or modifies the checking of disk at boot time."},
	"CLS": {"scope":"bat","prefix":"/CLS","body":["CLS"],"description":"Clears the screen."},
	"CMD": {"scope":"bat","prefix":"/CMD","body":["CMD"],"description":"Starts a new command interpreter.\n/C Run command specified by string and then terminates\n/K Run command specified by string but remains\n/S Modifies the treatment of string Re /C or /K \n/Q Turns echo off\n/D Disable AutoRun commands from registry\n/A Output of internal commands to a pipe/file to be ANSI\n/U Output of internal commands to a pipe/file to be Unicode\n/T:fg   Sets the fore/background colors \n/E:ON   Enable command extensions\n/E:OFF  Disable command extensions \n/V:ON   Enable delayed environment variable expansion using ! as the\n delimiter. For example, /V:ON would allow !var! to expand the\n variable var at execution time.  The var syntax expands variables\n at input time, which is quite a different thing when inside of a FOR\n loop.\n/V:OFF  Disable delayed environment expansion"},
	"COLOR": {"scope":"bat","prefix":"/COLOR","body":["COLOR"],"description":"Sets the default console foreground and background colors."},
	"COMP": {"scope":"bat","prefix":"/COMP","body":["COMP"],"description":"Compares the contents of two files or sets of files."},
	"COMPACT": {"scope":"bat","prefix":"/COMPACT","body":["COMPACT"],"description":"Displays or alters the compression of files on NTFS partitions."},
	"CONVERT": {"scope":"bat","prefix":"/CONVERT","body":["CONVERT"],"description":"Converts FAT volumes to NTFS.  You cannot convert the current drive."},
	"COPY": {"scope":"bat","prefix":"/COPY","body":["COPY"],"description":"Copies one or more files to another location."},
	"DATE": {"scope":"bat","prefix":"/DATE","body":["DATE"],"description":"Displays or sets the date."},
	"DEL": {"scope":"bat","prefix":"/DEL","body":["DEL"],"description":"Deletes one or more files."},
	"DIR": {"scope":"bat","prefix":"/DIR","body":["DIR"],"description":"Displays a list of files and subdirectories in a directory."},
	"DISKCOMP": {"scope":"bat","prefix":"/DISKCOMP","body":["DISKCOMP"],"description":"Compares the contents of two floppy disks."},
	"DISKCOPY": {"scope":"bat","prefix":"/DISKCOPY","body":["DISKCOPY"],"description":"Copies the contents of one floppy disk to another."},
	"DISKPART": {"scope":"bat","prefix":"/DISKPART","body":["DISKPART"],"description":"Displays or configures Disk Partition properties."},
	"DOSKEY": {"scope":"bat","prefix":"/DOSKEY","body":["DOSKEY"],"description":"Edits command lines, recalls Windows commands, and creates macros."},
	"DRIVERQUERY": {"scope":"bat","prefix":"/DRIVERQUERY","body":["DRIVERQUERY"],"description":"Displays current device driver status and properties."},
	"ECHO": {"scope":"bat","prefix":"/ECHO","body":["ECHO"],"description":"Displays messages, or turns command echoing on or off.\nUse @ in batch files line 1 to hide"},
	"ENDLOCAL": {"scope":"bat","prefix":"/ENDLOCAL","body":["ENDLOCAL"],"description":"Ends localization of environment changes in a batch file."},
	"ERASE": {"scope":"bat","prefix":"/ERASE","body":["ERASE"],"description":"Deletes one or more files."},
	"EXIT": {"scope":"bat","prefix":"/EXIT","body":["EXIT"],"description":"Quits the CMD.EXE program (command interpreter)."},
	"FC": {"scope":"bat","prefix":"/FC","body":["FC"],"description":"Compares two files or sets of files, and displays the differences between them."},
	"FIND": {"scope":"bat","prefix":"/FIND","body":["FIND"],"description":"Searches for a text string in a file or files."},
	"FINDSTR": {"scope":"bat","prefix":"/FINDSTR","body":["FINDSTR"],"description":"Searches for strings in files."},
	"FOR": {"scope":"bat","prefix":"/FOR","body":["FOR"],"description":"Runs a specified command for each file in a set of files."},
	"FORMAT": {"scope":"bat","prefix":"/FORMAT","body":["FORMAT"],"description":"Formats a disk for use with Windows."},
	"FSUTIL": {"scope":"bat","prefix":"/FSUTIL","body":["FSUTIL"],"description":"Displays or configures the file system properties."},
	"FTYPE": {"scope":"bat","prefix":"/FTYPE","body":["FTYPE"],"description":"Displays or modifies file types used in file extension associations."},
	"GOTO": {"scope":"bat","prefix":"/GOTO","body":["GOTO"],"description":"Directs the Windows command interpreter to a labeled line in a batch program."},
	"GPRESULT": {"scope":"bat","prefix":"/GPRESULT","body":["GPRESULT"],"description":"Displays Group Policy information for machine or user."},
	"GRAFTABL": {"scope":"bat","prefix":"/GRAFTABL","body":["GRAFTABL"],"description":"Enables Windows to display an extended character set in graphics mode."},
	"HELP": {"scope":"bat","prefix":"/HELP","body":["HELP"],"description":"Provides Help information for Windows commands."},
	"ICACLS": {"scope":"bat","prefix":"/ICACLS","body":["ICACLS"],"description":"Display, modify, backup, or restore ACLs for files and directories."},
	"IF": {"scope":"bat","prefix":"/IF","body":["IF"],"description":"Performs conditional processing in batch programs."},
	"LABEL": {"scope":"bat","prefix":"/LABEL","body":["LABEL"],"description":"Creates, changes, or deletes the volume label of a disk."},
	"MD": {"scope":"bat","prefix":"/MD","body":["MD"],"description":"Creates a directory."},
	"MKDIR": {"scope":"bat","prefix":"/MKDIR","body":["MKDIR"],"description":"Creates a directory."},
	"MKLINK": {"scope":"bat","prefix":"/MKLINK","body":["MKLINK"],"description":"Creates Symbolic Links and Hard Links"},
	"MODE": {"scope":"bat","prefix":"/MODE","body":["MODE"],"description":"Configures a system device."},
	"MORE": {"scope":"bat","prefix":"/MORE","body":["MORE"],"description":"Displays output one screen at a time."},
	"MOVE": {"scope":"bat","prefix":"/MOVE","body":["MOVE"],"description":"Moves one or more files from one directory to another directory."},
	"OPENFILES": {"scope":"bat","prefix":"/OPENFILES","body":["OPENFILES"],"description":"Displays files opened by remote users for a file share."},
	"PATH": {"scope":"bat","prefix":"/PATH","body":["PATH"],"description":"Displays or sets a search path for executable files."},
	"PAUSE": {"scope":"bat","prefix":"/PAUSE","body":["PAUSE"],"description":"Suspends processing of a batch file and displays a message."},
	"POPD": {"scope":"bat","prefix":"/POPD","body":["POPD"],"description":"Restores the previous value of the current directory saved by PUSHD."},
	"PRINT": {"scope":"bat","prefix":"/PRINT","body":["PRINT"],"description":"Prints a text file."},
	"PROMPT": {"scope":"bat","prefix":"/PROMPT","body":["PROMPT"],"description":"Changes the Windows command prompt."},
	"PUSHD": {"scope":"bat","prefix":"/PUSHD","body":["PUSHD"],"description":"Saves the current directory then changes it."},
	"RD": {"scope":"bat","prefix":"/RD","body":["RD"],"description":"Removes a directory."},
	"RECOVER": {"scope":"bat","prefix":"/RECOVER","body":["RECOVER"],"description":"Recovers readable information from a bad or defective disk."},
	"REM": {"scope":"bat","prefix":"/REM","body":["REM"],"description":"Records comments (remarks) in batch files or CONFIG.SYS."},
	"REN": {"scope":"bat","prefix":"/REN","body":["REN"],"description":"Renames a file or files."},
	"RENAME": {"scope":"bat","prefix":"/RENAME","body":["RENAME"],"description":"Renames a file or files."},
	"REPLACE": {"scope":"bat","prefix":"/REPLACE","body":["REPLACE"],"description":"Replaces files."},
	"RMDIR": {"scope":"bat","prefix":"/RMDIR","body":["RMDIR"],"description":"Removes a directory."},
	"ROBOCOPY": {"scope":"bat","prefix":"/ROBOCOPY","body":["ROBOCOPY"],"description":"Advanced utility to copy files and directory trees"},
	"SET": {"scope":"bat","prefix":"/SET","body":["SET"],"description":"Displays, sets, or removes Windows environment variables."},
	"SETLOCAL": {"scope":"bat","prefix":"/SETLOCAL","body":["SETLOCAL"],"description":"Begins localization of environment changes in a batch file."},
	"SC": {"scope":"bat","prefix":"/SC","body":["SC"],"description":"Displays or configures services (background processes)."},
	"SCHTASKS": {"scope":"bat","prefix":"/SCHTASKS","body":["SCHTASKS"],"description":"Schedules commands and programs to run on a computer."},
	"SHIFT": {"scope":"bat","prefix":"/SHIFT","body":["SHIFT"],"description":"Shifts the position of replaceable parameters in batch files."},
	"SHUTDOWN": {"scope":"bat","prefix":"/SHUTDOWN","body":["SHUTDOWN"],"description":"Allows proper local or remote shutdown of machine."},
	"SORT": {"scope":"bat","prefix":"/SORT","body":["SORT"],"description":"Sorts input."},
	"START": {"scope":"bat","prefix":"/START","body":["START"],"description":"Starts a separate window to run a specified program or command."},
	"SUBST": {"scope":"bat","prefix":"/SUBST","body":["SUBST"],"description":"Associates a path with a drive letter."},
	"SYSTEMINFO": {"scope":"bat","prefix":"/SYSTEMINFO","body":["SYSTEMINFO"],"description":"Displays machine specific properties and configuration."},
	"TASKLIST": {"scope":"bat","prefix":"/TASKLIST","body":["TASKLIST"],"description":"Displays all currently running tasks including services."},
	"TASKKILL": {"scope":"bat","prefix":"/TASKKILL","body":["TASKKILL"],"description":"Kill or stop a running process or application."},
	"TIME": {"scope":"bat","prefix":"/TIME","body":["TIME"],"description":"Displays or sets the system time."},
	"TITLE": {"scope":"bat","prefix":"/TITLE","body":["TITLE"],"description":"Sets the window title for a CMD.EXE session."},
	"TREE": {"scope":"bat","prefix":"/TREE","body":["TREE"],"description":"Graphically displays the directory structure of a drive or path."},
	"TYPE": {"scope":"bat","prefix":"/TYPE","body":["TYPE"],"description":"Displays the contents of a text file."},
	"VER": {"scope":"bat","prefix":"/VER","body":["VER"],"description":"Displays the Windows version."},
	"VERIFY": {"scope":"bat","prefix":"/VERIFY","body":["VERIFY"],"description":"Tells Windows whether to verify that your files are written correctly to a disk."},
	"VOL": {"scope":"bat","prefix":"/VOL","body":["VOL"],"description":"Displays a disk volume label and serial number."},
	"XCOPY": {"scope":"bat","prefix":"/XCOPY","body":["XCOPY"],"description":"Copies files and directory trees."},
	"WMIC": {"scope":"bat","prefix":"/WMIC","body":["WMIC"],"description":"Displays WMI information inside interactive command shell."}

}

php.json

Language Specific - Edit files as listed in "User Snippets" Menu

{
// Place your snippets for php here. 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"
// }

    "sn_try_catch":{
      "prefix": "sn_try_catch",
      "body":[
      "set_error_handler(function() { throw new Exception('Enter_Name_For_Your_Error');});",
      "try {        ",
      "    $$a=1/0;",
      "    echo \"OK\";",
      "}",
      "catch (Exception $$owt) {",    
      "   echo $$owt;",
      "}",
          "restore_error_handler();"
          ],
          "description": "Try Catch"
    },



 "Date General Uses": {
	 "prefix": "date_AH_Uses",
 	"body": [			
		"",
		"\\$date=date_create(); // Today",			
		"",			
		"date_add(\\$date,date_interval_create_from_date_string(\"1 days\")); //-1 for 1 day back",
		"",			
		"\\$date=date_create_from_format('Y-m-d','2019-12-15');",
		"",
		"echo date_format(\\$date,'Y-m-d');",
		"",
		],
"description": "Common Date Uses"
 }
}

vbscript.json

Language Specific - Edit files as listed in "User Snippets" Menu

{

// Created by Andrew Harper
// Snippets For Visual Studio Code 
// To Do
//  * FormatCurrency,FormatDateTime,FormatNumber,FormatPercent,GetLocale,GetObject
//  * Weekday,WeekdayName
//  * Excel etc??


// Place your snippets for vbscript here. 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"
// }

"Abs": {"scope": "vbscript","prefix": "/Abs", "body": ["Abs(${1:number})"],"description": "Return Absolute"},
"AppActivate.": {"scope": "vbscript","prefix": "/AppActivate.", "body": ["${1:objShellName}.AppActivate ${2:strApplicationTitle}\n$0"],"description": "AppActivate"},
"Array": {"scope": "vbscript","prefix": "/Array", "body": ["Array(${1:value1,value2….})"],"description": "Add values to an Array variable"},
"Arguments": {"scope": "vbscript","prefix": "Arguments", "body": ["Set ${1:objArgs} = Wscript.Arguments"],"description": "Get Cmd Line Args into Object [Object has .item(x) .count and .length ]"},
"Asc": {"scope": "vbscript","prefix": "/Asc", "body": ["Asc(\"${1:character}\")"],"description": "Return ASCII Number of 1st Character"},
"AscW": {"scope": "vbscript","prefix": "/AscW", "body": ["AscW(\"${1:character}\")"],"description": "Return UNICODE Number of Character"},
"Atn": {"scope": "vbscript","prefix": "/Atn", "body": ["Atn(${1:number})"],"description": "Return Arctan"}, 
"CBool": {"scope": "vbscript","prefix": "/CBool", "body": ["CBool(\"${1:bool as string}\")"],"description": "Convert String etc to Boolean"},
"CByte": {"scope": "vbscript","prefix": "/CByte", "body": ["CByte(\"${1:byte as string}\")"],"description": "Convert String etc to Byte"},
"CCur": {"scope": "vbscript","prefix": "/CCur", "body": ["CCur(\"${1:currency as string}\")"],"description": "Convert String etc to Currency"},
"Cdate": {"scope": "vbscript","prefix": "/Cdate", "body": ["Cdate(\"${1:date as string}\")"],"description": "Convert String etc to Date"},
"Cdbl": {"scope": "vbscript","prefix": "/Cdbl", "body": ["Cdbl(${1:value or expression})"],"description": "Convert value or expression to double \"100\" 100*10 NOT \"100*10\""},
"Chr": {"scope": "vbscript","prefix": "/Chr", "body": ["Chr(${1:value0-255})"],"description": "Returns Ascii eg. 65 returns A"},
"ChrW": {"scope": "vbscript","prefix": "/ChrW", "body": ["ChrW(${1:value})"],"description": "Returns UNICODE eg. 65 returns A"},
"CInt": {"scope": "vbscript","prefix": "/CInt", "body": ["CInt(\"${1:int as string}\")"],"description": "Convert String etc to Integer"},		 
"CLng": {"scope": "vbscript","prefix": "/CLng", "body": ["CLng(\"${1:Long as string}\")"],"description": "Convert String etc to Long"},		 
"Cos": {"scope": "vbscript","prefix": "/Cos", "body": ["Cos(${1:number})"],"description": "Return Cosine"},
"CSng": {"scope": "vbscript","prefix": "/CSng", "body": ["CSng(\"${1:Single as string}\")"],"description": "Convert String etc to Single"},		 		  
"CStr": {"scope": "vbscript","prefix": "/CStr", "body": ["CStr(\"${1:Value}\")"],"description": "Convert Value to String"},		 		  
"Date": {"scope": "vbscript","prefix": "/Date", "body": ["Date"],"description": "Returns Current Date"},
"DateAdd": {"scope": "vbscript","prefix": "/DateAdd", "body": ["DateAdd (\"${1|yyyy,q,m,y,d,w,h,n,s|}\",${2:increment number},${3:DateToAddTo})"],"description": "Returns Amended Date"},
"DateDiff": {"scope": "vbscript","prefix": "/DateDiff", "body": ["DateDiff(\"${1|yyyy,q,m,y,d,w,h,n,s|}\",${2:date1},${3:Date2},${4|vbSunday,vbMonday,vbTuesday,vbWednesday,vbThursday,vbFriday,vbSaturday|},${5|vbUseSystem,vbFirstJan1,vbFirstFourDays,vbFirstFullWeek|})"],"description": "Returns Date Differences For Interval"},
"DatePart": {"scope": "vbscript","prefix": "/DatePart", "body": ["DateDiff(\"${1|yyyy,q,m,y,d,w,h,n,s|}\",${2:date},${3|vbSunday,vbMonday,vbTuesday,vbWednesday,vbThursday,vbFriday,vbSaturday|},${4|vbUseSystem,vbFirstJan1,vbFirstFourDays,vbFirstFullWeek|})"],"description": "Returns Part of a given Date"},
"DateSerial": {"scope": "vbscript","prefix": "/DateSerial", "body": ["DateSerial (${1:YearNo}, ${2:MonthNo}, ${3:DayNo})"],"description": "Returns Date From Y M D as separate numbers"},
"DateValue": {"scope": "vbscript","prefix": "/DateValue", "body": ["DateValue(\"${1:date as string}\")"],"description": "Convert String etc to Date"},
"Day": {"scope": "vbscript","prefix": "/Day", "body": ["Day(${1:Date})"],"description": "Returns Day From Date"},
"Dim": {"scope": "vbscript","prefix": "/Dim", "body": ["Dim ${1:var or array}"],"description": "Dim Array"},
"DoWhile": {"scope": "vbscript","prefix": "/DoWhile", "body": ["Do While ${1:Condition}\n\t${2:'Statements}\n'Exit Do\nLoop$0"],"description": "Do While Also Use [(Do Until) (Loop)],[(Do) (Loop Until)],[(Do) (Loop While)]"},
"Escape": {"scope": "vbscript","prefix": "/Escape", "body": ["Escape(${1:string})"],"description": "Remove Unicode Allowed If Ok For URL"},
"Excel": {"scope": "vbscript","prefix": "/ExcelMake", "body": ["Set ${1:obj} = CreateObject(\"Excel.Application\")"],"description": "Create Excel Object"}, 
"Exit": {"scope": "vbscript","prefix": "/Exit", "body": ["Exit ${1|Do,For,Function,Property,Sub|}"],"description": "Exit Do,For,Function,Property or Sub"},
"Exp": {"scope": "vbscript","prefix": "/Exp", "body": ["Exp(${1:number})"],"description": "Return e to the power of n"}, 
"Eval": {"scope": "vbscript","prefix": "/Eval", "body": ["Eval(${1:stringToEval})"],"description": "VB Syntax to be evaluated"}, 
"FileSystemObject": {"scope": "vbscript","prefix": "/FileSystemObject", "body": ["Set ${1:FSO} = CreateObject(\"Scripting.FileSystemObject\")\n$0"],"description": "Create Scripting.FileSystemObject"},
"FileSystemObject.": {"scope": "vbscript","prefix": "/FileSystemObject.", "body": ["${1:FilesystemObject}${2|.BuildPath(strPath\\,strFileName),.CopyFile(Source\\, Dest [\\,Overwrite (True/False)]),.CopyFolder(Source\\, Dest [\\,Overwrite (True/False)]),.CreateFolder(Path),.CreateTextFile(FileName [\\,Overwrite (True/False) [\\, Unicode (True/False)]]),.DeleteFile(FileSpec\\, Force (True/False)),.DeleteFolder(FileSpec\\, Force (True/False)),.DriveExists(strDrive),.FileExists(strFile),.FolderExists(strFolder),.GetAbsolutePathName(strPath),.GetBaseName(strPath),.GetDrive(strDrive),.GetDriveName(strDrive),.GetExtensionName(strPath),.GetFile(strPath),.GetFileName(strPath),.GetFolder(strPath),.GetParentFolderName(strPath),.GetSpecialFolderName(FolderType),.GetStandardStream(Type [\\,Unicode (True/False)]),.GetTempName(),.MoveFile(Source\\, Dest),.MoveFolder(Source\\, Dest),.OpenTextFile(strFile \\,IOMode 8=append 1=Read 2=Write \\,Create True/False \\,Format 0=Ascii -1=Unicode -2=default)|}"],"description": "FileSystemObject. Options"},
"Filter": {"scope": "vbscript","prefix": "/Filter", "body": ["Filter (${1:SourceArray}, ${2:FilterString} ,${3|True,False|} ,${4|vbBinaryCompare,vbTextCompare|})"],"description": "Filter Array into New Array,True Filter Match OR False Non Filter Matches"}, 
"Fix": {"scope": "vbscript","prefix": "/Fix", "body": ["Fix(${1:numberOrVar})"],"description": "Return Integer Part of Number"},
"ForNext": {"scope": "vbscript","prefix": "/ForNext", "body": ["For ${1:counter} = ${2:initial_value} To ${3:Max_value} ${4:[Optional Step stepCounter]}\n\t${5:[Statements]}\n\t'Exit For\nNext"],"description": "For Next Loop"},		  
"ForEach": {"scope": "vbscript","prefix": "/ForEach", "body": ["For Each ${1:element} in ${2:group}\n\t${3:[Statements]}\n\t'Exit For\nNext"],"description": "For Each Next Loop"},		  		
"Function": {"scope": "vbscript","prefix": "/Function", "body": ["Function ${1:name} () \n\nEnd Function"],"description": "Function"},
"Hex": {"scope": "vbscript","prefix": "/Hex", "body": ["Hex(${1:Number})"],"description": "Convert No To Hex"},
"Hour": {"scope": "vbscript","prefix": "/Hour", "body": ["Hour(${1:Time})"],"description": "Returns Hour of Time"},
"IE": {"scope": "vbscript","prefix": "/IEMake", "body": ["Set ${1:obj} = CreateObject(\"InternetExplorer.Application\")"],"description": "Create IE Object"}, 
"If": {"scope": "vbscript","prefix": "/If", "body": ["If ${1:value1} = ${2:value1} Then\n\t${3:[Statements]}\n'ElseIf ${4:condition} Then\n\t'${5:[Statements]}\nEnd If"],"description": "If Statement"},		  		
"InputBox": {"scope": "vbscript","prefix": "/InputBox", "body": ["InputBox(${1:Prompt},${2:Title},${3:Default},${4:xpos},${5:ypos},${6:helpfile},${7:context})"],"description": "Input Box"},
"InStr": {"scope": "vbscript","prefix": "/InStr", "body": ["InStr(${1:StringToLookIn},${2:StringToSearchFor})"],"description": "Find string"},
"InStrRev": {"scope": "vbscript","prefix": "/InStrRev", "body": ["InStr(${1:StringToLookIn},${2:StringToSearchFor})"],"description": "Find string Look In Reverse Order"},
"IsArray": {"scope": "vbscript","prefix": "/IsArray", "body": ["IsArray(${1:VariableName})"],"description": "Check For Array"},
"IsDate": {"scope": "vbscript","prefix": "/IsDate", "body": ["IsDate(${1:VariableName})"],"description": "Check For Date"},
"IsEmpty": {"scope": "vbscript","prefix": "/IsEmpty", "body": ["IsEmpty(${1:VariableName})"],"description": "Check For Empty"},
"IsNull": {"scope": "vbscript","prefix": "/IsNull", "body": ["IsNull(${1:VariableName})"],"description": "Check For Null"},
"IsNumeric": {"scope": "vbscript","prefix": "/IsNumeric", "body": ["IsNumeric(${1:VariableName})"],"description": "Check For Numeric"},
"IsObject": {"scope": "vbscript","prefix": "/IsObject", "body": ["IsObject(${1:VariableName})"],"description": "Check For Object"},
"Join": {"scope": "vbscript","prefix": "/Join", "body": ["Join(${1:OneDimArray},${2:OPT Delimiter Else \" \"})"],"description": "Check For Object"},
"LBound": {"scope": "vbscript","prefix": "/LBound", "body": ["LBound(${1:ArrayName},${2:ArrayDimension})"],"description": "Get Lowest Array Counter For Given Dimension"},
"Lcase": {"scope": "vbscript","prefix": "/Lcase", "body": ["Lcase(${1:string})"],"description": "Convert to lowercase"},
"Left": {"scope": "vbscript","prefix": "/Left", "body": ["Left(${1:String},${2:NoOfCharacters})"],"description": "Leftmost Substring"},
"Len": {"scope": "vbscript","prefix": "/Len", "body": ["Len(${1:string})"],"description": "Length of a String"},
"Log": {"scope": "vbscript","prefix": "/Log", "body": ["Log(${1:number})"],"description": "Log Of A Number"},
"LTrim": {"scope": "vbscript","prefix": "/LTrim", "body": ["LTrim(${1:string})"],"description": "Remove Leading Spaces"},
"Mid": {"scope": "vbscript","prefix": "/Mid", "body": ["Mid(${1:String},${2:StartNoCharacter},${3:LengthNoCharacters})"],"description": "Substring"},
"Minute": {"scope": "vbscript","prefix": "/Minute", "body": ["Minute(${1:Time})"],"description": "Returns Minute of Time"},
"MsgBox": {"scope": "vbscript","prefix": "/MsgBox", "body": ["${1:VarX} = MsgBox(\"${2:MessageText}\",${3|vbOKOnly,vbOKCancel,vbAbortRetryIgnore,vbYesNoCancel,vbYesNo,vbRetryCancel|},\"${4:title}\")\n$0"],"description": "Message Box  NB Remove () if No Return Value Required"},
"Month": {"scope": "vbscript","prefix": "/Month", "body": ["Month(${1:date})"],"description": "Return Month From Date"},
"Now": {"scope": "vbscript","prefix": "/Now", "body": ["Now"],"description": "Current Time and Date"},
"Oct": {"scope": "vbscript","prefix": "/Oct", "body": ["Oct(${1:Number})"],"description": "Convert No To Oct"},
"Outlook": {"scope": "vbscript","prefix": "/OutlookMake", "body": ["Set ${1:obj} = CreateObject(\"Outlook.Application\")"],"description": "Create Outlook Object"}, 		
"Private": {"scope": "vbscript","prefix": "/Private", "body": ["Private ${1:stringVariable}"],"description": "Private Variable Declaration"},
"Public": {"scope": "vbscript","prefix": "/Public", "body": ["Public ${1:string}"],"description": "Public Variable Declaration"},
"ReDim": {"scope": "vbscript","prefix": "/ReDim", "body": ["ReDim ${1:Opt Preserve} ${2:ArrayName}(${3:NewArrayDim})"],"description": "ReDim Array"},
"Rem": {"scope": "vbscript","prefix": "/Rem", "body": ["Rem"],"description": "Comment"},
"Replace": {"scope": "vbscript","prefix": "/Replace", "body": ["Replace(${1:MainString},${2:StringToFindinMain},${2:NewStringForMain})"],"description": "Find and Replace String"},
"RGB": {"scope": "vbscript","prefix": "/RGB", "body": ["RGB(${1:red},${2:green},${2:blue})"],"description": "RGB As single number"},
"Right": {"scope": "vbscript","prefix": "/Right", "body": ["Right(${1:String},${2:NoOfCharacters})"],"description": "Rightmost Substring"},
"Rnd": {"scope": "vbscript","prefix": "/Rnd", "body": ["Rnd()"],"description": "Random Number enter seed in brackets if required"},
"Round": {"scope": "vbscript","prefix": "/Round", "body": ["Round(${1:Value},${2:NoOfDecimalPlaces})"],"description": "Round a Number"},
"RTrim": {"scope": "vbscript","prefix": "/RTrim", "body": ["RTrim(${1:string})"],"description": "Remove Trailing Spaces"},
"Second": {"scope": "vbscript","prefix": "/Second", "body": ["Second(${1:Time})"],"description": "Returns Second of Time"},
"Shell" : {"scope": "vbscript","prefix": "/shell","body": "Set ${1:ShellName} = CreateObject(\"Shell.Application\")\n","description": "Create Shell.Application"},
"Sin": {"scope": "vbscript","prefix": "/Sin", "body": ["Sin(${1:number})"],"description": "Return Sine"}, 
"Sleep": {"scope": "vbscript","prefix": "/Sleep", "body": ["Wscript.Sleep(${1:1000=1sec})"],"description": "Sleep MilliSecs"},
"Sgn": {"scope": "vbscript","prefix": "/Sgn", "body": ["Sgn(${1:number})"],"description": "Returns the sign of a number"},
"Space": {"scope": "vbscript","prefix": "/Space", "body": ["Space(${1:number})"],"description": "Returns n Spaces"},
"Split": {"scope": "vbscript","prefix": "/Split", "body": ["Split(${1:String},${2:Delimiter})"],"description": "Split Into Array on Delimiter"},
"Sqr": {"scope": "vbscript","prefix": "/Sqr", "body": ["Sqr(${1:number})"],"description": "Return Square Root"},
"String": {"scope": "vbscript","prefix": "/String", "body": ["String(${1:Number},${2:Character})"],"description": "Returns a string of 1 character n times"},
"StrComp": {"scope": "vbscript","prefix": "/StrComp", "body": ["StrComp(${1:String},${2:String})"],"description": "Returns 0 if Same else -1 or 1 if 1>2 2>1 etc"},
"StrReverse": {"scope": "vbscript","prefix": "/StrReverse", "body": ["StrReverse(${1:string})"],"description": "Return Reversed String"},
"Sub": {"scope": "vbscript","prefix": "/Sub", "body": ["Sub ${1:name} () \n\nEnd Sub"],"description": "Sub"},
"Tan": {"scope": "vbscript","prefix": "/Tan", "body": ["Tan(${1:number})"],"description": "Return Tangent"}, 
"Time": {"scope": "vbscript","prefix": "/Time", "body": ["Time"],"description": "Current Time"},
"Timer": {"scope": "vbscript","prefix": "/Timer", "body": ["Timer"],"description": "Seconds Since Midnight"},
"TimeSerial": {"scope": "vbscript","prefix": "/TimeSerial", "body": ["TimeSerial(${1:Hours},${2:Minutes},${3:Seconds})"],"description": "Time Based on input H M S"},					  
"TimeValue": {"scope": "vbscript","prefix": "/TimeValue", "body": ["TimeValue(${1:timeAsString})"],"description": "Time Based on input string"},					  
"Trim": {"scope": "vbscript","prefix": "/Trim", "body": ["Trim(${1:string})"],"description": "Remove Trailing Spaces"},
"TypeName": {"scope": "vbscript","prefix": "/TypeName", "body": ["TypeName(${1:VarName})"],"description": "Return Variant SubType of a Variable"},
"UBound": {"scope": "vbscript","prefix": "/UBound", "body": ["UBound(${1:ArrayName},${2:ArrayDimension})"],"description": "Get Highest Array Counter For Given Dimension"},
"Ucase": {"scope": "vbscript","prefix": "/Ucase", "body": ["Ucase(${1:string})"],"description": "Convert to UPPERCASE"},
"UnEscape": {"scope": "vbscript","prefix": "/UnEscape", "body": ["UnEscape(${1:string})"],"description": "Return Unicode to Escaped String"},
"Word": {"scope": "vbscript","prefix": "/WordMake", "body": ["Set ${1:obj} = CreateObject(\"Word.Application\")"],"description": "Create Word Object"}, 
"Wscript.Echo": {"scope": "vbscript","prefix": "/Wscript.Echo", "body": ["Wscript.Echo(\"${1:Text or Var[NB remove \"\"]} \")"],"description": "Write to Command Line"},
"Wscript.Interactive": {"scope": "vbscript","prefix": "/Wscript.Interactive", "body": ["Wscript.Interactive = ${1|true,false|}"],"description": "Set Interaction"},
"VarType": {"scope": "vbscript","prefix": "/VarType", "body": ["VarType(${1:VarName})"],"description": "Return Type of a Variable"},
"Year": {"scope": "vbscript","prefix": "/Year", "body": ["Year(${1:date})"],"description": "Return Year From Date"}


}

favourite addins

Beautify
Bookmarks
Code Runner
GitLens
hexdump for VSCode
PHP Debug
PowerShell
Python
R
Rainbow CSV
SQL Beautify
SQL Formatter
SQL Server (mssql)
SQLTools - Database Tools
VBScript
XML Tools

Tasks

See all variables at variables-reference

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Open As HTML",
            "type": "shell",
            "command": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
            "args": [
                "${file}"
            ]
        },
        {
            "label": "Open In Notepad",
            "type": "shell",
            "command": "Notepad.exe",
            "args": [
                "${file}"
            ],
            "problemMatcher": []
        },
        {
            "label": "Open Selected File In Notepad",
            "type": "shell",
            "command": "Notepad.exe",
            "args": [
                "${input:FN}"
            ]
        },
        {
            "label": "Open Current File In Select From",
            "type": "shell",
            "command": "",
            "args": [
                "${input:selApp}",
                "${file}"
            ]
        }
    ],
    "inputs": [
        {
            "id": "FN",
            "type":"promptString",
            "description": "Enter Full Path",
            "default": "C:\\Users\\andrew.harper\\GETSAP\\Setup\\SpoolList.txtWIP"
        },
        {
            "type": "pickString",
            "id": "selApp",
            "description": "Select Open With App?",
            "options": ["Notepad","C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"],
            "default": "Notepad"
        }
    ]
}
⚠️ **GitHub.com Fallback** ⚠️