From 8148255ef1c416f414c3a78405eff08fe149d16e Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 27 Sep 2017 20:23:42 +0200 Subject: Add vifm support, closes #213 --- ftplugin/vifm.vim | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ftplugin/vifm.vim (limited to 'ftplugin/vifm.vim') diff --git a/ftplugin/vifm.vim b/ftplugin/vifm.vim new file mode 100644 index 00000000..055f0630 --- /dev/null +++ b/ftplugin/vifm.vim @@ -0,0 +1,50 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1 + +" vifmrc filetype plugin +" Maintainer: xaizek +" Last Change: July 08, 2016 +" Based On: Vim file type file by Bram Moolenaar + +if exists("b:did_ftplugin") + finish +endif + +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo-=C + +let b:undo_ftplugin = "setlocal formatoptions< comments< textwidth< commentstring<" + +" Break comment lines but not other lines +setlocal formatoptions-=t formatoptions+=croql + +" Set comment character +setlocal comments=:\" + +" Format comments to be up to 78 characters long +if &textwidth == 0 + setlocal textwidth=78 +endif + +" Comments start with a double quote +setlocal commentstring=\"%s + +" Move around comments +nnoremap ]" :call search('^\(\s*".*\n\)\@ +vnoremap ]" :exe "normal! gv"call search('^\(\s*".*\n\)\@ +nnoremap [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") +vnoremap [" :exe "normal! gv"call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") + +" Let the matchit plugin know what items can be matched. +if exists("loaded_matchit") + let b:match_ignorecase = 0 + let b:match_words = '\:\:\' +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : + +endif -- cgit v1.2.3