From f8ebaf824cfcfac3e1bd86d0bb3ec5220de8845a Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sun, 30 Oct 2016 22:07:30 +0100 Subject: [PATCH] Gitv plugin --- vim/ftplugin/gitv.vim | 48 ------------------------------------------- vimrc | 1 + 2 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 vim/ftplugin/gitv.vim diff --git a/vim/ftplugin/gitv.vim b/vim/ftplugin/gitv.vim deleted file mode 100644 index 90fa45c..0000000 --- a/vim/ftplugin/gitv.vim +++ /dev/null @@ -1,48 +0,0 @@ -"AUTHOR: Greg Sexton -"WEBSITE: http://www.gregsexton.org/portfolio/gitv/ -"LICENSE: Same terms as Vim itself (see :help license). -"NOTES: Much of the credit for gitv goes to Tim Pope and the fugitive plugin -" where this plugin either uses functionality directly or was inspired heavily. - -"enabling these next lines breaks settings when reloading the buffer -"if exists("b:did_ftplugin") | finish | endif -"let b:did_ftplugin = 1 - -let s:cpo_save = &cpo -set cpo&vim - -setlocal fdm=expr - -fu! Foldlevelforbranch() "{{{ - let line = getline(v:lnum) - - if line == "-- Load More --" - return 0 - endif - if line =~ "^-- \\[.*\\] --$" - return 0 - endif - - let line = substitute(line, "\\s", "", "g") - let level = match(line, "*") + 1 - return level == 0 ? -1 : level -endfu "}}} -setlocal foldexpr=Foldlevelforbranch() - -fu! BranchFoldText() "{{{ - "get first non-blank line - let fs = v:foldstart - while getline(fs) =~ '^\s*$' | let fs = nextnonblank(fs + 1) - endwhile - if fs > v:foldend - let line = getline(v:foldstart) - else - let line = getline(fs) - endif - return line -endf "}}} -setlocal foldtext=BranchFoldText() -setlocal foldlevel=99 - -let &cpo = s:cpo_save -unlet s:cpo_save diff --git a/vimrc b/vimrc index e10a03a..8285e4c 100644 --- a/vimrc +++ b/vimrc @@ -55,6 +55,7 @@ Plugin 'tomtom/tcomment_vim' Plugin 'ahri/vim-sesspit' Plugin 'voronkovich/ctrlp-symfony2.vim' Plugin 'Colorizer--Brabandt' +Plugin 'gregsexton/gitv' call vundle#end()