Skip to content

Commit

Permalink
Very basic syntax highlighting for .vimrc
Browse files Browse the repository at this point in the history
Refs #463
  • Loading branch information
J-Fields committed Nov 21, 2019
1 parent 8065749 commit 7379d42
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,22 @@
"default": true
}
}
}
},
"languages": [
{
"id": "vimrc",
"extensions": [
".vimrc"
]
}
],
"grammars": [
{
"language": "vimrc",
"scopeName": "source.vimrc",
"path": "./syntaxes/vimrc.tmLanguage.json"
}
]
},
"scripts": {
"vscode:prepublish": "gulp build",
Expand Down
32 changes: 32 additions & 0 deletions syntaxes/vimrc.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "vimrc",
"fileTypes": [".vimrc"],
"scopeName": "source.vimrc",
"patterns": [
{
"name": "comment.line",
"match": "\".*$"
},
{
"name": "entity.name.function",
"match": "^(map|nmap|vmap|smap|xmap|omap|map!|imap|lmap|cmap)"
},
{
"name": "entity.name.function",
"match": "^(noremap|nnoremap|vnoremap|snoremap|xnoremap|onoremap|noremap!|inoremap|lnoremap|cnoremap)"
},
{
"name": "entity.name.function",
"match": "^(unmap|nunmap|vunmap|sunmap|xunmap|ounmap|unmap!|iunmap|lunmap|cunmap)"
},
{
"name": "entity.name.function",
"match": "^set"
},
{
"name": "string.unquoted",
"match": ".*$"
}
]
}

0 comments on commit 7379d42

Please sign in to comment.