From 18e7b111f4830638a288f6c2bc056f5325b9c22f Mon Sep 17 00:00:00 2001 From: Elliot Shank Date: Mon, 29 Dec 2014 17:03:17 -0600 Subject: [PATCH] Initial version of Vim plugin. --- Changes | 6 ++++++ support/vim/README.md | 3 +++ support/vim/ftdetect/fig.vim | 1 + support/vim/ftplugin/fig.vim | 2 ++ support/vim/syntax/fig.vim | 23 +++++++++++++++++++++++ 5 files changed, 35 insertions(+) create mode 100644 support/vim/README.md create mode 100644 support/vim/ftdetect/fig.vim create mode 100644 support/vim/ftplugin/fig.vim create mode 100644 support/vim/syntax/fig.vim diff --git a/Changes b/Changes index 4ab437e..df9a0d8 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +v1.xx - 2015/01/xx + + Miscellaneous: + + - A rudimentary Vim plugin has been added to the repository. + v1.22.1.beta.1 - 2014/12/17 Bug fixes: diff --git a/support/vim/README.md b/support/vim/README.md new file mode 100644 index 0000000..fd7053d --- /dev/null +++ b/support/vim/README.md @@ -0,0 +1,3 @@ +I use this via [Pathogen](https://github.com/tpope/vim-pathogen). I have a +clone of the Fig repository and symlink the `fig/support` directory into one of +the directories that I have Pathogen pull from. diff --git a/support/vim/ftdetect/fig.vim b/support/vim/ftdetect/fig.vim new file mode 100644 index 0000000..398c03d --- /dev/null +++ b/support/vim/ftdetect/fig.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufRead *.fig setfiletype fig diff --git a/support/vim/ftplugin/fig.vim b/support/vim/ftplugin/fig.vim new file mode 100644 index 0000000..ba08538 --- /dev/null +++ b/support/vim/ftplugin/fig.vim @@ -0,0 +1,2 @@ +setlocal commentstring=#\ %s +setlocal iskeyword+=- diff --git a/support/vim/syntax/fig.vim b/support/vim/syntax/fig.vim new file mode 100644 index 0000000..93e5f3d --- /dev/null +++ b/support/vim/syntax/fig.vim @@ -0,0 +1,23 @@ +syntax keyword figTodo TODO XXX FIXME NOTE + +syntax keyword figKeyword + \ grammar + \ archive + \ resource + \ retrieve + \ config + \ end + \ override + \ include + \ include-file + \ command + \ add + \ append + \ path + \ set + +syntax match figComment "#.*" contains=figTodos + +highlight default link figTodo Todo +highlight default link figKeyword Keyword +highlight default link figComment Comment