aboutsummaryrefslogtreecommitdiff
path: root/vim/filetype.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-03 00:28:53 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-03 00:58:31 +1200
commit4b16fc4ecc4fdb002ad9c833af148918767ed806 (patch)
tree628fce5b093f12d55824c1dc72c9577afd98ed54 /vim/filetype.vim
parentCorrect name of Makefile target (diff)
downloaddotfiles-4b16fc4ecc4fdb002ad9c833af148918767ed806.tar.gz
dotfiles-4b16fc4ecc4fdb002ad9c833af148918767ed806.zip
Implement personal filetype.vim
This implements only the syntax highlighting for file types I regularly use and care about, implemented in the way I want them to work, with files named per type in ftdetect/*.vim. I have chosen only file types with which I regularly deal and for which syntax highlighting and filetype/indent plugins are actually useful. Most other files, e.g. system config files I edit infrequently and only with sudoedit(8), don't really benefit from that. Much of this is just copied from the distribution filetype.vim file, but some of it I do specifically in a way I want, such as the shell decision logic. We'll see how well this works.
Diffstat (limited to 'vim/filetype.vim')
-rw-r--r--vim/filetype.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/vim/filetype.vim b/vim/filetype.vim
new file mode 100644
index 00000000..2abe7831
--- /dev/null
+++ b/vim/filetype.vim
@@ -0,0 +1,11 @@
+" Override filetypes.vim
+if exists('g:did_load_filetypes')
+ finish
+endif
+let g:did_load_filetypes = 1
+
+" Use only the rules in ftdetect
+augroup filetypedetect
+ autocmd!
+ runtime! ftdetect/*.vim
+augroup END