MivaLearn
7/8/2024 - 4:49 PM

MMT VS Code Snippets

MMT Snippets streamline the development process by providing quick access to commonly used commands and phrases within VS Code. These snippets are designed to enhance your efficiency and productivity when using MMT with VS Code. To use you will have to write the command in a file or VS code window, but then you can copy/paste the final command into the terminal.

{
	// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
	// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
	// is left empty or omitted, the snippet gets applied to all languages. 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": {
	// 	"scope": "javascript,typescript",
	// 	"prefix": "log",
	// 	"body": [
	// 		"console.log('$1');",
	// 		"$2"
	// 	],
	// 	"description": "Log output to console"
	// }
	"mmt help": {
		"prefix": "mmt-help",
		"body": [
			"mmt --help"
		]
	},
	"mmt info": {
		"prefix": "mmt-info",
		"body": [
			"mmt info${1: OPTIONAL_PATH}"
		]
	},
	"mmt status": {
		"prefix": "mmt-status",
		"body": [
			"mmt status${1: OPTIONAL_PATH}"
		]
	},
	"mmt diff": {
		"prefix": "mmt-diff",
		"body": [
			"mmt diff ${1:SPACE_SEPERATED_LIST_OF_FILE_PATHS}"
		]
	},
	"mmt log": {
		"prefix": "mmt-log",
		"body": [
			"mmt log${1: -C ${2:CHANGESET}}${3: -c ${4:OR__CHANGES_SINCE_THIS_CHANGESET}}${5: --verbose}${6: OPTIONAL_PATH}"
		]
	},
	"mmt config list": {
		"prefix": "mmt-config-list",
		"body": [
			"mmt config list"
		]
	},
	"mmt config set": {
		"prefix": "mmt-config-set",
		"body": [
			"mmt config set ${1:CONFIG_KEY} ${2:CONFIG_VALUE}"
		]
	},
	"mmt config delete": {
		"prefix": "mmt-config-delete",
		"body": [
			"mmt config delete ${1:CONFIG_KEY}"
		]
	},
	"mmt tag list": {
		"prefix": "mmt-tag-list",
		"body": [
			"mmt tag list"
		]
	},
	"mmt tag add": {
		"prefix": "mmt-tag-add",
		"body": [
			"mmt tag add ${1:SPACE_SEPERATED_LIST_OF_TAGS}"
		]
	},
	"mmt tag set": {
		"prefix": "mmt-tag-set",
		"body": [
			"mmt tag set ${1:SPACE_SEPERATED_LIST_OF_TAGS}"
		]
	},
	"mmt tag delete": {
		"prefix": "mmt-tag-delete",
		"body": [
			"mmt tag delete ${1:--all }${2:SPACE_SEPERATED_LIST_OF_TAGS}"
		]
	},
	"mmt branch list": {
		"prefix": "mmt-branch-list",
		"body": [
			"mmt branch list --credential-key ${1:CREDENTIAL_KEY} --store-code ${2:STORE_CODE}"
		]
	},
	"mmt branch create": {
		"prefix": "mmt-branch-create",
		"body": [
			"mmt branch create ${1:BRANCH_NAME} --from ${2:BRANCH_FROM} --store-code ${3:STORE_CODE} --credential-key ${4:CREDENTIAL_KEY}${5: --color \"${6:BRANCH_COLOR}\"}"
		]
	},
	"mmt branch delete": {
		"prefix": "mmt-branch-delete",
		"body": [
			"mmt branch delete ${1:BRANCH_NAME} --credential-key ${2:CREDENTIAL_KEY} --store-code ${3:STORE_CODE}"
		]
	},
	"mmt checkout": {
		"prefix": "mmt-checkout",
		"body": [
			"mmt checkout ${1:REMOTE_KEY} ${2:PATH}${3: --reinitialize}${4: --ignore-unsynced-templates}${5: --ignore-unsynced-properties}"
		]
	},
	"mmt switch": {
		"prefix": "mmt-switch",
		"body": [
			"mmt switch ${1:REMOTE_KEY}"
		]
	},
	"mmt credential": {
		"prefix": "mmt-credential",
		"body": [
			"mmt credential ${1:add|update} ${2: CREDENTIAL_KEY} --url ${3:URL}${4: --token ${5:TOKEN}}${6: --signing-key ${7:SIGNING_KEY}}${8: --ssh-username ${9:SSH_USERNAME}}${10: --ssh-private-key ${11:SSH_PRIVATE_KEY}}"
		]
	},
	"mmt credential token": {
		"prefix": "mmt-credential-token",
		"body": [
			"mmt credential ${1:add|update} ${5:CREDENTIAL_KEY} --url ${3:URL} --token ${4:TOKEN} --signing-key ${5:SIGNING_KEY}"
		]
	},
	"mmt credential ssh": {
		"prefix": "mmt-credential-ssh",
		"body": [
			"mmt credential ${1:add|update} ${2:CREDENTIAL_KEY} --url ${3:URL} --ssh-username ${4:SSH_USERNAME} --ssh-private-key ${5:SSH_PRIVATE_KEY}"
		]
	},
	"mmt push": {
		"prefix": "mmt-push",
		"body": [
			"mmt push --notes \"${1:NOTE_MESSAGE}\"${2: OPTIONAL_SPACE_SEPERATED_LIST_OF_FILE_PATHS}"
		]
	},
	"mmt pull": {
		"prefix": "mmt-pull",
		"body": [
			"mmt pull${1: --force}${2: -c ${3:OPTIONAL_CHANGE_SET}}${4: OR__OPTIONAL_SPACE_SEPERATED_LIST_OF_FILE_PATHS}"
		]
	},
	"mmt revert": {
		"prefix": "mmt-revert",
		"body": [
			"mmt revert ${1:--all }${2:SPACE_SEPERATED_LIST_OF_FILE_PATHS}"
		]
	},
	"mmt remote": {
		"prefix": "mmt-remote",
		"body": [
			"mmt remote ${1:add|update} ${REMOTE_KEY} --credential-key ${2:CREDENTIAL_KEY} --branch-name ${3:BRANCH_NAME} --store-code ${4:STORE_CODE}"
		]
	}
}