crtl+shift+p
Preferences: Configure User Snippets
- Select the language (eg
mvbasic
) [language].json
will be created- Add the snippets and save
mvbasic.json
{
"t24subr": {
"prefix": "t24subr",
"body": [
"SUBROUTINE ${TM_FILENAME_BASE}",
"*------------------------------------------------------------------",
"* ${CLIPBOARD}",
"*------------------------------------------------------------------",
"* Developer: Aaron Niyonzima(aaron@mathisi.io)",
"* Date : ${CURRENT_DATE}/${CURRENT_MONTH}/${CURRENT_YEAR}",
"* Version : 0.0.1",
"*-------------------------------------------------------------------",
"\t$$INSERT I_COMMON",
"\t$$INSERT I_EQUATE",
"\t${2:}\n",
"\tRETURN",
"END",
],
"description": "T24 Subroutine Template"
},
"fread": {
"prefix": "fread",
"body": "CALL F.READ(${1:fname}, ${2:id}, ${3:record}, ${4:fh}, err)",
"description": "Read T24 File record"
},
"opf": {
"prefix": "opf",
"body": "CALL OPF(${1:fname}, ${2:fh})",
"description": "Open File"
},
"insert": {
"prefix": "insert",
"body": "$$INSERT I_F.${1:fname}",
"description": "Insert File"
},
"localref": {
"prefix": "localref",
"body": [
"CALL GET.LOC.REF('${1:IN_APPL}', '${2:IN_FIELD.NAME}', ${3:OUT_POS.NO})",
"${4:VAR} = ${5:record}<${6:PREX}.LOCAL.REF, ${3:OUT_POS.NO}>"
],
"description": "Get local ref table (eg. ACCOUNT>AC.LOCAL.REF>STAFF.ID"
}
}
Add the following lines settings.json
...
"[mvbasic]": {
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
}
}
...