From c6ba201e0c7c06f844f0379205869d69d243e310 Mon Sep 17 00:00:00 2001 From: Eric Wald Date: Sat, 28 Jan 2006 05:18:01 +0100 Subject: [PATCH] CONTRIB: Add ftplugin for setting Vim to the ELinks coding style This will replace the .vimrc infrastructure currently used, which is considered insecure. --- contrib/vim/c_elinks.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 contrib/vim/c_elinks.vim diff --git a/contrib/vim/c_elinks.vim b/contrib/vim/c_elinks.vim new file mode 100644 index 00000000..51af0172 --- /dev/null +++ b/contrib/vim/c_elinks.vim @@ -0,0 +1,15 @@ +" Setting Vim to support the ELinks coding style +" +" To use this file, drop it in ~/.vim/ftplugin and set filetype plugin on. +" Finally, make sure the path to the source directory contains the word +" 'elinks', for example ~/src/elinks/. +" +" For .h files, link it as cpp_elinks.vim or define c_syntax_for_h in ~/.vimrc. +" For .inc files, let g:filetype_inc = 'c' in ~/.vimrc. + +if expand('%:p:h') =~ '.*elinks.*' + setlocal shiftwidth=8 + setlocal tabstop=8 + setlocal softtabstop=0 + setlocal noexpandtab +endif