diff --git a/.gitmodules b/.gitmodules index 50b6227..620da83 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,39 @@ -[submodule ".vim/bundle/vundle"] - path = .vim/bundle/vundle - url = https://github.com/gmarik/vundle.git +[submodule ".vim/bundle/ag.vim"] + path = .vim/bundle/ag.vim + url = https://github.com/rking/ag.vim +[submodule ".vim/bundle/ctrlp.vim"] + path = .vim/bundle/ctrlp.vim + url = https://github.com/kien/ctrlp.vim +[submodule ".vim/bundle/vim-startify"] + path = .vim/bundle/vim-startify + url = https://github.com/mhinz/vim-startify +[submodule ".vim/bundle/nerdcommenter"] + path = .vim/bundle/nerdcommenter + url = https://github.com/scrooloose/nerdcommenter +[submodule ".vim/bundle/nerdtree"] + path = .vim/bundle/nerdtree + url = https://github.com/scrooloose/nerdtree +[submodule ".vim/bundle/vim-fugitive"] + path = .vim/bundle/vim-fugitive + url = https://github.com/tpope/vim-fugitive +[submodule ".vim/bundle/vim-showmarks"] + path = .vim/bundle/vim-showmarks + url = https://github.com/jacquesbh/vim-showmarks +[submodule ".vim/bundle/vim-coffee-script"] + path = .vim/bundle/vim-coffee-script + url = https://github.com/kchmck/vim-coffee-script +[submodule ".vim/bundle/nginx.vim"] + path = .vim/bundle/nginx.vim + url = https://github.com/vim-scripts/nginx.vim +[submodule ".vim/bundle/vim-gitgutter"] + path = .vim/bundle/vim-gitgutter + url = https://github.com/airblade/vim-gitgutter +[submodule ".vim/bundle/vim-multiple-cursors"] + path = .vim/bundle/vim-multiple-cursors + url = https://github.com/terryma/vim-multiple-cursors +[submodule ".vim/bundle/supertab"] + path = .vim/bundle/supertab + url = https://github.com/ervandew/supertab +[submodule ".vim/bundle/tagbar"] + path = .vim/bundle/tagbar + url = https://github.com/majutsushi/tagbar diff --git a/.vim/autoload/pathogen.vim b/.vim/autoload/pathogen.vim new file mode 100644 index 0000000..a13ae08 --- /dev/null +++ b/.vim/autoload/pathogen.vim @@ -0,0 +1,347 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.3 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. +" +" The API is documented inline below. + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke +" pathogen#surround(). Curly braces are expanded with pathogen#expand(): +" "bundle/{}" finds all subdirectories inside "bundle" inside all directories +" in the runtime path. +function! pathogen#infect(...) abort + for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}'] + if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]' + call pathogen#surround(path) + elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)' + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#surround(path . '/{}') + elseif path =~# '[{}*]' + call pathogen#interpose(path) + else + call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') + call pathogen#interpose(path . '/{}') + endif + endfor + call pathogen#cycle_filetype() + if pathogen#is_disabled($MYVIMRC) + return 'finish' + endif + return '' +endfunction + +" Split a path into a list. +function! pathogen#split(path) abort + if type(a:path) == type([]) | return a:path | endif + if empty(a:path) | return [] | endif + let split = split(a:path,'\\\@]','\\&','') + endif +endfunction + +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort "{{{1 + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif +endfunction + +" Section: Deprecated + +function! s:warn(msg) abort + echohl WarningMsg + echomsg a:msg + echohl NONE +endfunction + +" Prepend all subdirectories of path to the rtp, and append all 'after' +" directories in those subdirectories. Deprecated. +function! pathogen#runtime_prepend_subdirectories(path) abort + call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')') + return pathogen#surround(a:path . pathogen#slash() . '{}') +endfunction + +function! pathogen#incubate(...) abort + let name = a:0 ? a:1 : 'bundle/{}' + call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')') + return pathogen#interpose(name) +endfunction + +" Deprecated alias for pathogen#interpose(). +function! pathogen#runtime_append_all_bundles(...) abort + if a:0 + call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')') + else + call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()') + endif + return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}') +endfunction + +if exists(':Vedit') + finish +endif + +let s:vopen_warning = 0 + +function! s:find(count,cmd,file,lcd) + let rtp = pathogen#join(1,pathogen#split(&runtimepath)) + let file = pathogen#runtime_findfile(a:file,a:count) + if file ==# '' + return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" + endif + if !s:vopen_warning + let s:vopen_warning = 1 + let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' + else + let warning = '' + endif + if a:lcd + let path = file[0:-strlen(a:file)-2] + execute 'lcd `=path`' + return a:cmd.' '.pathogen#fnameescape(a:file) . warning + else + return a:cmd.' '.pathogen#fnameescape(file) . warning + endif +endfunction + +function! s:Findcomplete(A,L,P) + let sep = pathogen#slash() + let cheats = { + \'a': 'autoload', + \'d': 'doc', + \'f': 'ftplugin', + \'i': 'indent', + \'p': 'plugin', + \'s': 'syntax'} + if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) + let request = cheats[a:A[0]].a:A[1:-1] + else + let request = a:A + endif + let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' + let found = {} + for path in pathogen#split(&runtimepath) + let path = expand(path, ':p') + let matches = split(glob(path.sep.pattern),"\n") + call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') + call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') + for match in matches + let found[match] = 1 + endfor + endfor + return sort(keys(found)) +endfunction + +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) +command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) + +" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': diff --git a/.vim/bundle/ag.vim b/.vim/bundle/ag.vim new file mode 160000 index 0000000..e70e049 --- /dev/null +++ b/.vim/bundle/ag.vim @@ -0,0 +1 @@ +Subproject commit e70e049bfd1f4dce1d55881c4eee3e4320121cfc diff --git a/.vim/bundle/ctrlp.vim b/.vim/bundle/ctrlp.vim new file mode 160000 index 0000000..b5d3fe6 --- /dev/null +++ b/.vim/bundle/ctrlp.vim @@ -0,0 +1 @@ +Subproject commit b5d3fe66a58a13d2ff8b6391f4387608496a030f diff --git a/.vim/bundle/nerdcommenter b/.vim/bundle/nerdcommenter new file mode 160000 index 0000000..6549cfd --- /dev/null +++ b/.vim/bundle/nerdcommenter @@ -0,0 +1 @@ +Subproject commit 6549cfde45339bd4f711504196ff3e8b766ef5e6 diff --git a/.vim/bundle/nerdtree b/.vim/bundle/nerdtree new file mode 160000 index 0000000..3b98a7f --- /dev/null +++ b/.vim/bundle/nerdtree @@ -0,0 +1 @@ +Subproject commit 3b98a7fcae8f9fff356907171f0406ff8cd28921 diff --git a/.vim/bundle/nginx.vim b/.vim/bundle/nginx.vim new file mode 160000 index 0000000..152bbb2 --- /dev/null +++ b/.vim/bundle/nginx.vim @@ -0,0 +1 @@ +Subproject commit 152bbb2dc00c2df37049ccf75f68f294208c72cb diff --git a/.vim/bundle/supertab b/.vim/bundle/supertab new file mode 160000 index 0000000..454c06e --- /dev/null +++ b/.vim/bundle/supertab @@ -0,0 +1 @@ +Subproject commit 454c06e25680799b6f408622d6bfbaf920ace825 diff --git a/.vim/bundle/tagbar b/.vim/bundle/tagbar new file mode 160000 index 0000000..fcac7f2 --- /dev/null +++ b/.vim/bundle/tagbar @@ -0,0 +1 @@ +Subproject commit fcac7f2936606697b2db84855bd1e7939576986e diff --git a/.vim/bundle/vim-coffee-script b/.vim/bundle/vim-coffee-script new file mode 160000 index 0000000..827e4a3 --- /dev/null +++ b/.vim/bundle/vim-coffee-script @@ -0,0 +1 @@ +Subproject commit 827e4a38b07479433b619091469a7495a392df8a diff --git a/.vim/bundle/vim-fugitive b/.vim/bundle/vim-fugitive new file mode 160000 index 0000000..3471901 --- /dev/null +++ b/.vim/bundle/vim-fugitive @@ -0,0 +1 @@ +Subproject commit 34719016ec934609387e90804ad49b3d221f0b19 diff --git a/.vim/bundle/vim-gitgutter b/.vim/bundle/vim-gitgutter new file mode 160000 index 0000000..e5efbaf --- /dev/null +++ b/.vim/bundle/vim-gitgutter @@ -0,0 +1 @@ +Subproject commit e5efbaffc066ababc9ae0d689c7050fa5d6591bd diff --git a/.vim/bundle/vim-multiple-cursors b/.vim/bundle/vim-multiple-cursors new file mode 160000 index 0000000..4259878 --- /dev/null +++ b/.vim/bundle/vim-multiple-cursors @@ -0,0 +1 @@ +Subproject commit 42598788848355097f1b7f1996769da9b5c6267d diff --git a/.vim/bundle/vim-showmarks b/.vim/bundle/vim-showmarks new file mode 160000 index 0000000..1966a54 --- /dev/null +++ b/.vim/bundle/vim-showmarks @@ -0,0 +1 @@ +Subproject commit 1966a54616cc5b9483dcced8c640f508e2a46c4e diff --git a/.vim/bundle/vim-startify b/.vim/bundle/vim-startify new file mode 160000 index 0000000..b184b92 --- /dev/null +++ b/.vim/bundle/vim-startify @@ -0,0 +1 @@ +Subproject commit b184b92e963dd1d8504c451f9226f56bf8fbacfa diff --git a/.vim/bundle/vundle b/.vim/bundle/vundle deleted file mode 160000 index 0b28e33..0000000 --- a/.vim/bundle/vundle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0b28e334e65b6628b0a61c412fcb45204a2f2bab diff --git a/.vimrc b/.vimrc index 42e381c..085d6b3 100644 --- a/.vimrc +++ b/.vimrc @@ -118,29 +118,11 @@ set statusline=%<%f\ %h%m%r\ %{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P " Cus let mapleader="," -" Vundle Area filetype off -set rtp+=~/.vim/bundle/vundle/ -call vundle#rc() +execute pathogen#infect() -Bundle 'gmarik/vundle' - -Bundle 'rking/ag.vim' -Bundle 'kien/ctrlp.vim' -Bundle 'mhinz/vim-startify' -Bundle 'scrooloose/nerdcommenter' -Bundle 'scrooloose/nerdtree' -Bundle 'tpope/vim-fugitive' -Bundle 'jacquesbh/vim-showmarks' -Bundle 'kchmck/vim-coffee-script' -Bundle 'vim-scripts/nginx.vim' -Bundle 'airblade/vim-gitgutter' -Bundle 'terryma/vim-multiple-cursors' - -Bundle 'ervandew/supertab' let g:SuperTabDefaultCompletionType = "context" -Bundle 'majutsushi/tagbar' let g:tagbar_type_go = { \ 'ctagstype' : 'go', \ 'kinds' : [ @@ -274,6 +256,7 @@ nmap zx "+x " custom filetypes au BufNewFile,BufRead *.fasm setf fasm +au BufNewFile,BufRead *.pi setf python cmap w!! %!sudo tee >/dev/null %