Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating the pathogen autoloader

- Checking in my .gvimrc that wasn't previously tracked
- Removing nonworking binding from vimrc
  • Loading branch information...
commit 0d54a3246872d9a942600d4cf7adbad4df225d59 1 parent e71410b
@shayfrendt authored
Showing with 43 additions and 7 deletions.
  1. +27 −0 .gvimrc
  2. +0 −1  .vimrc
  3. +16 −6 autoload/pathogen.vim
View
27 .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
View
1  .vimrc
@@ -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=.
View
22 autoload/pathogen.vim
@@ -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')
@@ -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))
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.