John Guidry avatar John Guidry committed 698f805

1. Add CtrlP for fast file jumping
2. Use autocmd to set working directory to dir of current file

Comments (0)

Files changed (3)

 .vim/bundle/minibufexpl.vim = [git]https://github.com/fholgado/minibufexpl.vim.git
 .vim/bundle/vim-javascript = [git]https://github.com/pangloss/vim-javascript.git
 .vim/bundle/nerdcommenter = [git]https://github.com/scrooloose/nerdcommenter.git
+.vim/bundle/ctrlp.vim = [git]https://github.com/kien/ctrlp.vim.git
 9895285042a2fd5691b2f6582aa979e4d1bdffea .vim/bundle/ack.vim
+4d5b39c0cf005bc48e6d5916e631c0b444ebc419 .vim/bundle/ctrlp.vim
 d92c8b01248d612444829001b3e081629d37a1aa .vim/bundle/minibufexpl.vim
 baa453aad84bbdb999c9d75915886244b98c39f3 .vim/bundle/nerdcommenter
 205367ab3f46dcc88b6ebb819a276e793a21e995 .vim/bundle/nerdtree
 let g:html_indent_script1 = "inc"
 let g:html_indent_style1 = "inc"
 
-filetype off
+" CtrlP file finder settings
+" Remap to avoid clobbering autocompletion
+let g:ctrlp_map = '<Leader>f'
+
+" Sane ignore settings
+let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$\|node_modules$' 
 
 " To disable a plugin, add it's bundle name to the following list
 let g:pathogen_disabled = []
 set statusline+=%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''}
 set statusline+=%*
 
-set statusline+=%h      "help file flag
-set statusline+=%r      "read only flag
-set statusline+=%m      "modified flag
+set statusline+=%h " help file flag
+set statusline+=%r " read only flag
+set statusline+=%m " modified flag
 
-set statusline+=\    " Space.
+set statusline+=\  " Space.
 
 " Line and column position and counts.
 set statusline+=(line\ %l\/%L,\ col\ %03c)
 
-set statusline+=\    " Space.
+set statusline+=\      " Space.
 
-set statusline+=%=      "right align.
+set statusline+=%=     " right align.
 
-set statusline+=%{&ft}                                  "filetype (python).
+set statusline+=%{&ft} " filetype (python).
 
 " Begin scroll three lines from edge 
 set scrolloff=3
     autocmd BufEnter *.ctp set syn=php
   augroup END
 
+  autocmd BufEnter * if bufname("") !~ "^\[A-Za-z0-9\]*://" | lcd %:p:h | endif
 endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.