Skip to content

Commit

Permalink
Updating the pathogen autoloader
Browse files Browse the repository at this point in the history
- Checking in my .gvimrc that wasn't previously tracked
- Removing nonworking binding from vimrc
  • Loading branch information
shayfrendt committed Feb 1, 2011
1 parent e71410b commit 0d54a32
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 7 deletions.
27 changes: 27 additions & 0 deletions .gvimrc
@@ -0,0 +1,27 @@
" Keybindings:
source ~/.vim/keybindings.gui.vim

" Font: Choose font and enable anti-aliasing
set guifont=Monaco:h14
set antialias

" Maximize: Vert and Horiz by default
set fuoptions=maxvert,maxhorz

" Hide toolbar and menus.
set guioptions-=T
set guioptions-=m

" Scrollbar is always off.
set guioptions-=rL

" Console style tab labels
set guioptions-=e

" Don't flick cursor.
set guicursor=a:blinkon0


if filereadable(expand("~/.vim/custom_gvimrc"))
source ~/.vim/custom_gvimrc
endif
1 change: 0 additions & 1 deletion .vimrc
Expand Up @@ -195,7 +195,6 @@ set grepprg=ack
set grepformat=%f:%l:%m

inoremap <expr> <C-n> pumvisible() ? '<C-n>' : '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
" inoremap <silent> gw "_yiw:s/\\(\\%#\\w\\+\\)\\(\\W\\+\\)\\(\\w\\+\\)/\\3\\2\\1/<CR><c-o><c-l>
set completeopt=longest,menu,preview " insert mode comletion options
set complete=.
Expand Down
22 changes: 16 additions & 6 deletions autoload/pathogen.vim
Expand Up @@ -81,12 +81,22 @@ function! pathogen#glob_directories(pattern) abort " {{{1
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction "}}}1

" Prepend all subdirectories of path to the rtp, and append all after
" 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 = pathogen#glob_directories(a:path.sep."*[^~]")
let after = pathogen#glob_directories(a:path.sep."*[^~]".sep."after")
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)')
let rtp = pathogen#split(&rtp)
let path = expand(a:path)
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
Expand All @@ -108,9 +118,9 @@ function! pathogen#runtime_append_all_bundles(...) " {{{1
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
let list += pathogen#glob_directories(substitute(dir,'after$',name.sep.'*[^~]'.sep.'after','')) + [dir]
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name,'').sep.'*[^~]'.sep.'after'), '!pathogen#is_disabled(v:val)') + [dir]
else
let list += [dir] + pathogen#glob_directories(dir.sep.name.sep.'*[^~]')
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))
Expand All @@ -123,7 +133,7 @@ let s:done_bundles = ''
" 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') && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
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
Expand Down

0 comments on commit 0d54a32

Please sign in to comment.