Remove vim plugins from repo. Instead clone Vundle if missing

This commit is contained in:
kuben
2019-07-23 12:44:05 +02:00
parent 02570219b6
commit aa1283a006
10 changed files with 27 additions and 106 deletions

View File

@@ -1,41 +0,0 @@
function! CurtineIncSw()
if match(expand("%"), '\.c') > 0
let l:next_file = substitute(".*\\\/" . expand("%:t"), '\.c\(.*\)', '.h[a-z]*', "")
elseif match(expand("%"), "\\.h") > 0
let l:next_file = substitute(".*\\\/" . expand("%:t"), '\.h\(.*\)', '.c[a-z]*', "")
endif
if exists("b:previous_file") && b:previous_file == l:next_file
e#
else
let l:directory_name = fnamemodify(expand("%:p"), ":h")
" At this point cmd might evaluate to something of the format:
" /Users/person/ . -type f -iregex ".*\/test_class.h[a-z]*" -print -quit
let l:cmd="find " . l:directory_name . " . -type f -iregex \"" . l:next_file . "\" -print -quit"
" The substitute gets rid of the new line at the end of the result. The
" function `filereadable` does not like the newline that `find` puts at
" the end of the result and will not acknowledge that the file exists.
let l:result = substitute(system(l:cmd), '\n', '', '')
if filereadable(l:result)
exe "e " l:result
endif
endif
endfun
function! GetCurrentFile()
if exists("b:current_file")
let b:previous_file = b:current_file
endif
if match(expand("%"), '\.c') > 0
let b:current_file = substitute(".*\\\/" . expand("%:t"), '\.c\(.*\)', '.c[a-z]*', "")
elseif match(expand("%"), "\\.h") > 0
let b:current_file = substitute(".*\\\/" . expand("%:t"), '\.h\(.*\)', '.h[a-z]*', "")
endif
endfun
augroup CurtineIncSwCurrentFile
autocmd BufWinEnter * call GetCurrentFile()
augroup END

Submodule .vim/bundle/CurtineIncSw.vim deleted from 6b32ef621c

Submodule .vim/bundle/Vundle.vim deleted from 9a38216a1c

Submodule .vim/bundle/c.vim deleted from 69f0368c7d

Submodule .vim/bundle/ctrlp.vim deleted from 2e773fd8c7

Submodule .vim/bundle/nerdtree deleted from 33fe2fdf16

Submodule .vim/bundle/vim-buffergator deleted from 947b60dca4

Submodule .vim/bundle/vim-fugitive deleted from aff3359699

Submodule .vim/bundle/vim-gutentags deleted from eecb136fae

58
.vimrc
View File

@@ -1,10 +1,10 @@
cd /repo/efjtjkb/epg/up/
set nocompatible " be iMproved, required set nocompatible " be iMproved, required
filetype off " required filetype off " required
let vundle_dir="~/.vim/bundle/Vundle.vim"
if filereadable(expand(vundle_dir) . "/README.md")
" set the runtime path to include Vundle and initialize " set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim let &rtp .= "," . vundle_dir
call vundle#begin() call vundle#begin()
Plugin 'VundleVim/Vundle.vim' " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' " let Vundle manage Vundle, required
@@ -14,11 +14,20 @@ Plugin 'c.vim'
Plugin 'jeetsukumaran/vim-buffergator' Plugin 'jeetsukumaran/vim-buffergator'
Plugin 'ericcurtin/CurtineIncSw.vim' Plugin 'ericcurtin/CurtineIncSw.vim'
Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-fugitive'
" Plugin 'tpope/vim-surround'
Plugin 'ctrlpvim/ctrlp.vim' Plugin 'ctrlpvim/ctrlp.vim'
" Plugin 'shougo/neocomplete'
Plugin 'godlygeek/tabular'
call vundle#end() " required call vundle#end() " required
else
let vundle_repo="https://github.com/VundleVim/Vundle.vim.git"
echo "Vundle not installed, type :CloneVundle to clone the vundle repo"
command CloneVundle execute "!git clone " . vundle_repo . " " . vundle_dir
endif
filetype plugin indent on " required filetype plugin indent on " required
syntax on
set tabstop=4 " show existing tab with 4 spaces width set tabstop=4 " show existing tab with 4 spaces width
set shiftwidth=4 " when indenting with '>', use 4 spaces width set shiftwidth=4 " when indenting with '>', use 4 spaces width
@@ -34,9 +43,11 @@ command! -bang Q quit<bang>
" fugitive.vim looks for tags in .git " fugitive.vim looks for tags in .git
" set tags +=~/tags " Recursively move upwards in tree, searching in subfolders for tags file " set tags +=~/tags " Recursively move upwards in tree, searching in subfolders for tags file
if exists(":NERDTree")
" Open NERDTree if no file specified " Open NERDTree if no file specified
autocmd StdinReadPre * let s:std_in=1 autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
endif
" CtrlP " CtrlP
let g:ctrlp_working_path_mode = 'ra' let g:ctrlp_working_path_mode = 'ra'
@@ -78,44 +89,3 @@ nmap <F8> :silent !/home/efjtjkb/bin/comp<enter>
"nmap <F9> :silent !/home/efjtjkb/bin/run<enter> "nmap <F9> :silent !/home/efjtjkb/bin/run<enter>
autocmd VimEnter * noremap <F9> :silent !/home/efjtjkb/bin/run<enter> autocmd VimEnter * noremap <F9> :silent !/home/efjtjkb/bin/run<enter>
nmap <F10> :silent !/home/efjtjkb/bin/run old<enter> nmap <F10> :silent !/home/efjtjkb/bin/run old<enter>
" MINUT to et macros
let @a=':%s/MINUT_ASSERT_EQ/et_asserteq/ge
\:%s/MINUT_ASSERT_NE/et_assertne/ge
\:%s/MINUT_ASSERT_STREQ/et_asserteq_str/ge
\:%s/MINUT_ASSERT_STRNE/et_assertne_str/ge
\:%s/MINUT_ASSERT_PTREQ/et_asserteq_ptr/ge
\:%s/MINUT_ASSERT_PTRNE/et_assertne_ptr/ge
\:%s/MINUT_ASSERT/et_assert/ge
\:%s/MINUT_TEST_EQ/et_asserteq/ge
\:%s/MINUT_TEST_NE/et_assertne/ge
\:%s/MINUT_TEST_STREQ/et_asserteq_str/ge
\:%s/MINUT_TEST_STRNE/et_assertne_str/ge
\:%s/MINUT_TEST_PTREQ/et_asserteq_ptr/ge
\:%s/MINUT_TEST_PTRNE/et_assertne_ptr/ge
\:%s/MINUT_TEST/et_assert/ge
\:%s/\_s\+MINUT_RETURN_SUCCESS();//e
" \_s\+ all preceding whitespace
\:%s/#include "minut.h"/#include "et.h"/ge
'
function! Et(name)
let start = line('.') - 1
call append(start,"ET_FIXTURE(" . a:name . ", setup, teardown) {")
call append(start+1,"")
call append(start+2,"};")
call append(start+3,"")
call append(start+4,"ET_FIXTURE_FN(" . a:name . ", setup)")
call append(start+5,"{")
call append(start+6," " . a:name . "* fixture = et_test_fixture();")
call append(start+7,"")
call append(start+8," (void)fixture;")
call append(start+9,"}")
call append(start+10,"")
call append(start+11,"ET_FIXTURE_FN(" . a:name . ", teardown)")
call append(start+12,"{")
call append(start+13," " . a:name . "* fixture = et_test_fixture();")
call append(start+14,"")
call append(start+15," (void)fixture;")
call append(start+16,"}")
call append(start+17,"")