mirror of
https://github.com/lloeki/vimfiles.git
synced 2025-12-06 05:24:39 +01:00
Pathogen update and refactoring
- Now using g:pathogen_disabled instead of symlinking - Resetting submodules to start over cleanly - Pathogen is a submodule too now
This commit is contained in:
parent
647a7abb6a
commit
6ae6b994f4
34 changed files with 20 additions and 239 deletions
54
.gitmodules
vendored
54
.gitmodules
vendored
|
|
@ -1,51 +1,3 @@
|
||||||
[submodule "bundle.available/vim-colors-solarized"]
|
[submodule "bundle/vim-pathogen"]
|
||||||
path = bundle.available/vim-colors-solarized
|
path = bundle/vim-pathogen
|
||||||
url = http://github.com/altercation/vim-colors-solarized.git
|
url = https://github.com/tpope/vim-pathogen.git
|
||||||
[submodule "bundle.available/command-t"]
|
|
||||||
path = bundle.available/command-t
|
|
||||||
url = https://github.com/wincent/Command-T.git
|
|
||||||
[submodule "bundle.available/supertab"]
|
|
||||||
path = bundle.available/supertab
|
|
||||||
url = https://github.com/ervandew/supertab.git
|
|
||||||
[submodule "bundle.available/vim-markdown"]
|
|
||||||
path = bundle.available/vim-markdown
|
|
||||||
url = https://github.com/plasticboy/vim-markdown.git
|
|
||||||
[submodule "bundle.available/vim-surround"]
|
|
||||||
path = bundle.available/vim-surround
|
|
||||||
url = https://github.com/tpope/vim-surround.git
|
|
||||||
[submodule "bundle.available/matchit"]
|
|
||||||
path = bundle.available/matchit
|
|
||||||
url = https://github.com/edsono/vim-matchit
|
|
||||||
[submodule "bundle.available/ack.vim"]
|
|
||||||
path = bundle.available/ack.vim
|
|
||||||
url = https://github.com/mileszs/ack.vim.git
|
|
||||||
[submodule "bundle.available/vcscommand"]
|
|
||||||
path = bundle.available/vcscommand
|
|
||||||
url = git://repo.or.cz/vcscommand
|
|
||||||
[submodule "bundle.available/git-vim"]
|
|
||||||
path = bundle.available/git-vim
|
|
||||||
url = https://github.com/motemen/git-vim.git
|
|
||||||
[submodule "bundle.available/closetag"]
|
|
||||||
path = bundle.available/closetag
|
|
||||||
url = git://github.com/docunext/closetag.vim.git
|
|
||||||
[submodule "bundle.available/pyflakes"]
|
|
||||||
path = bundle.available/pyflakes
|
|
||||||
url = git://github.com/kevinw/pyflakes-vim.git
|
|
||||||
[submodule "bundle.available/nerdcommenter"]
|
|
||||||
path = bundle.available/nerdcommenter
|
|
||||||
url = git://github.com/scrooloose/nerdcommenter.git
|
|
||||||
[submodule "bundle.available/fugitive"]
|
|
||||||
path = bundle.available/fugitive
|
|
||||||
url = git://github.com/tpope/vim-fugitive.git
|
|
||||||
[submodule "bundle.available/tagbar"]
|
|
||||||
path = bundle.available/tagbar
|
|
||||||
url = git://github.com/majutsushi/tagbar.git
|
|
||||||
[submodule "bundle.available/delimitmate"]
|
|
||||||
path = bundle.available/delimitmate
|
|
||||||
url = git://github.com/Raimondi/delimitMate.git
|
|
||||||
[submodule "bundle.available/vim-less"]
|
|
||||||
path = bundle.available/vim-less
|
|
||||||
url = https://github.com/groenewege/vim-less.git
|
|
||||||
[submodule "bundle.available/vim-coffee-script"]
|
|
||||||
path = bundle.available/vim-coffee-script
|
|
||||||
url = https://github.com/kchmck/vim-coffee-script.git
|
|
||||||
|
|
|
||||||
|
|
@ -1,142 +0,0 @@
|
||||||
" pathogen.vim - path option manipulation
|
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
|
||||||
" Version: 1.3
|
|
||||||
|
|
||||||
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
|
|
||||||
"
|
|
||||||
" API is documented below.
|
|
||||||
|
|
||||||
if exists("g:loaded_pathogen") || &cp
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let g:loaded_pathogen = 1
|
|
||||||
|
|
||||||
" Split a path into a list.
|
|
||||||
function! pathogen#split(path) abort " {{{1
|
|
||||||
if type(a:path) == type([]) | return a:path | endif
|
|
||||||
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
|
|
||||||
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
" Convert a list to a path.
|
|
||||||
function! pathogen#join(...) abort " {{{1
|
|
||||||
if type(a:1) == type(1) && a:1
|
|
||||||
let i = 1
|
|
||||||
let space = ' '
|
|
||||||
else
|
|
||||||
let i = 0
|
|
||||||
let space = ''
|
|
||||||
endif
|
|
||||||
let path = ""
|
|
||||||
while i < a:0
|
|
||||||
if type(a:000[i]) == type([])
|
|
||||||
let list = a:000[i]
|
|
||||||
let j = 0
|
|
||||||
while j < len(list)
|
|
||||||
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
|
|
||||||
let path .= ',' . escaped
|
|
||||||
let j += 1
|
|
||||||
endwhile
|
|
||||||
else
|
|
||||||
let path .= "," . a:000[i]
|
|
||||||
endif
|
|
||||||
let i += 1
|
|
||||||
endwhile
|
|
||||||
return substitute(path,'^,','','')
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
|
|
||||||
function! pathogen#legacyjoin(...) abort " {{{1
|
|
||||||
return call('pathogen#join',[1] + a:000)
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
" Remove duplicates from a list.
|
|
||||||
function! pathogen#uniq(list) abort " {{{1
|
|
||||||
let i = 0
|
|
||||||
let seen = {}
|
|
||||||
while i < len(a:list)
|
|
||||||
if has_key(seen,a:list[i])
|
|
||||||
call remove(a:list,i)
|
|
||||||
else
|
|
||||||
let seen[a:list[i]] = 1
|
|
||||||
let i += 1
|
|
||||||
endif
|
|
||||||
endwhile
|
|
||||||
return a:list
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
" \ on Windows unless shellslash is set, / everywhere else.
|
|
||||||
function! pathogen#separator() abort " {{{1
|
|
||||||
return !exists("+shellslash") || &shellslash ? '/' : '\'
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
" Convenience wrapper around glob() which returns a list.
|
|
||||||
function! pathogen#glob(pattern) abort " {{{1
|
|
||||||
let files = split(glob(a:pattern),"\n")
|
|
||||||
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
|
|
||||||
endfunction "}}}1
|
|
||||||
|
|
||||||
" Like pathogen#glob(), only limit the results to directories.
|
|
||||||
function! pathogen#glob_directories(pattern) abort " {{{1
|
|
||||||
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
|
|
||||||
endfunction "}}}1
|
|
||||||
|
|
||||||
" Checks if a bundle is 'disabled'. A bundle is considered 'disabled' if
|
|
||||||
" its 'basename()' is included in g:pathogen_disabled[]'.
|
|
||||||
function! pathogen#is_disabled(path) " {{{1
|
|
||||||
if !exists("g:pathogen_disabled")
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
let sep = pathogen#separator()
|
|
||||||
return index(g:pathogen_disabled, strpart(a:path, strridx(a:path, sep)+1)) != -1
|
|
||||||
endfunction "}}}1
|
|
||||||
|
|
||||||
" Prepend all subdirectories of path to the rtp, and append all 'after'
|
|
||||||
" directories in those subdirectories.
|
|
||||||
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
|
|
||||||
let sep = pathogen#separator()
|
|
||||||
let before = filter(pathogen#glob_directories(a:path.sep."*[^~]"), '!pathogen#is_disabled(v:val)')
|
|
||||||
let after = filter(pathogen#glob_directories(a:path.sep."*[^~]".sep."after"), '!pathogen#is_disabled(v:val[0:-7])')
|
|
||||||
let rtp = pathogen#split(&rtp)
|
|
||||||
let path = expand(a:path)
|
|
||||||
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
|
|
||||||
let &rtp = pathogen#join(pathogen#uniq(before + rtp + after))
|
|
||||||
return &rtp
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
" For each directory in rtp, check for a subdirectory named dir. If it
|
|
||||||
" exists, add all subdirectories of that subdirectory to the rtp, immediately
|
|
||||||
" after the original directory. If no argument is given, 'bundle' is used.
|
|
||||||
" Repeated calls with the same arguments are ignored.
|
|
||||||
function! pathogen#runtime_append_all_bundles(...) " {{{1
|
|
||||||
let sep = pathogen#separator()
|
|
||||||
let name = a:0 ? a:1 : 'bundle'
|
|
||||||
if "\n".s:done_bundles =~# "\\M\n".name."\n"
|
|
||||||
return ""
|
|
||||||
endif
|
|
||||||
let s:done_bundles .= name . "\n"
|
|
||||||
let list = []
|
|
||||||
for dir in pathogen#split(&rtp)
|
|
||||||
if dir =~# '\<after$'
|
|
||||||
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name,'').sep.'*[^~]'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
|
|
||||||
else
|
|
||||||
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name.sep.'*[^~]'), '!pathogen#is_disabled(v:val)')
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
let &rtp = pathogen#join(pathogen#uniq(list))
|
|
||||||
return 1
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
let s:done_bundles = ''
|
|
||||||
" }}}1
|
|
||||||
|
|
||||||
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
|
|
||||||
function! pathogen#helptags() " {{{1
|
|
||||||
for dir in pathogen#split(&rtp)
|
|
||||||
if dir[0 : strlen($VIM)-1] !=# $VIM && isdirectory(dir.'/doc') && !empty(glob(dir.'/doc/*')) && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
|
|
||||||
helptags `=dir.'/doc'`
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endfunction " }}}1
|
|
||||||
|
|
||||||
" vim:set ft=vim ts=8 sw=2 sts=2:
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit a41d5d52c39a31128e969e69acf800b198cb07f9
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 254d2307015370424034c0298a1148c4a7add069
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit cee619ac6e906d1c6bfc3052f01ccaa6ac1d4b3c
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 39b8298390a9171c796df077ad3c5f3c0f111c56
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 5f5c8da61fd817ba8dc091350b51c1ab7ca53c8d
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 74d01ae026092bc2fbf041227812e2a47c2ca7d8
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d9ec3017cf8fca4e8d0b1fcae3ff7115f7ff0d9d
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit b28e7be63235982501ab7dd30c03ea7feef7b095
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit fbe5743e55d18bd496a64c0340e7a504864343b4
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 344016d0222aa5a509c0d00b7c47d5856c5915c0
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 3c075654d424c6e3c20521bd4567b517a2410593
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit bb5d57afd9016705b1d7d6d9b707e5b70b4051ba
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit dc1692561461fd0b7642e05b03b7670974112eee
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 528a59f26d12278698bb946f8fb82a63711eec21
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 73fea97c8e3dde53f70ae69832877048b4204214
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit f3f96fd7c1bec0527de62415fd344e73994f1c47
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d9e6bfdd902fc661c8fd58ede248ccfc3b3039d7
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/ack.vim
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/closetag
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/command-t
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/delimitmate
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/fugitive
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/git-vim
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/nerdcommenter
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/supertab
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/tagbar
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/vim-coffee-script
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/vim-colors-solarized
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/vim-less
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/vim-markdown
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
../bundle.available/vim-surround
|
|
||||||
32
vimrc
32
vimrc
|
|
@ -1,13 +1,20 @@
|
||||||
" lloeki's vimrc
|
" lloeki's vimrc
|
||||||
|
|
||||||
set nocompatible
|
|
||||||
|
|
||||||
"bundle loading via pathogen
|
"bundle loading via pathogen
|
||||||
call pathogen#helptags()
|
let g:pathogen_disabled = ['command-t']
|
||||||
call pathogen#runtime_append_all_bundles()
|
|
||||||
|
|
||||||
|
filetype off
|
||||||
|
runtime bundle/vim-pathogen/autoload/pathogen.vim
|
||||||
|
call pathogen#infect()
|
||||||
|
syntax on
|
||||||
|
filetype plugin indent on
|
||||||
|
|
||||||
|
set nocompatible
|
||||||
scriptencoding "utf-8"
|
scriptencoding "utf-8"
|
||||||
|
|
||||||
|
"security measure
|
||||||
|
set modelines=0
|
||||||
|
|
||||||
" prevent .netrwhist creation
|
" prevent .netrwhist creation
|
||||||
let g:netrw_dirhistmax = 0
|
let g:netrw_dirhistmax = 0
|
||||||
|
|
||||||
|
|
@ -66,16 +73,6 @@ endif
|
||||||
" endif
|
" endif
|
||||||
"endif
|
"endif
|
||||||
|
|
||||||
"enable syntax highlighting if term supports enough colors
|
|
||||||
if has('syntax') && (&t_Co > 2)
|
|
||||||
syntax on
|
|
||||||
endif
|
|
||||||
|
|
||||||
"enable filetype detection
|
|
||||||
"filetype on
|
|
||||||
filetype plugin on
|
|
||||||
filetype indent on
|
|
||||||
|
|
||||||
"ignore some files
|
"ignore some files
|
||||||
set wildignore+=*.o,*.obj,.git,.svn,*.pyc
|
set wildignore+=*.o,*.obj,.git,.svn,*.pyc
|
||||||
|
|
||||||
|
|
@ -149,11 +146,16 @@ map [5D <Home>
|
||||||
map! [5D <Home>
|
map! [5D <Home>
|
||||||
map [5C <End>
|
map [5C <End>
|
||||||
map! [5C <End>
|
map! [5C <End>
|
||||||
"Terminal.app option+arrows
|
"Lion Terminal.app option+arrows
|
||||||
map b <M-Left>
|
map b <M-Left>
|
||||||
map! b <M-Left>
|
map! b <M-Left>
|
||||||
map f <M-Right>
|
map f <M-Right>
|
||||||
map! f <M-Right>
|
map! f <M-Right>
|
||||||
|
"Terminal.app option+arrows
|
||||||
|
map [1;3D <M-Left>
|
||||||
|
map! [1;3D <M-Left>
|
||||||
|
map [1;3C <M-Right>
|
||||||
|
map! [1;3C <M-Right>
|
||||||
|
|
||||||
" make meta move on words like control
|
" make meta move on words like control
|
||||||
map <M-Left> <C-Left>
|
map <M-Left> <C-Left>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue