mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-23 03:17:33 +00:00
CtrlP all the way
This commit is contained in:
parent
1e51cf2ade
commit
fa5cf71b03
88
vimrc
88
vimrc
@ -18,16 +18,7 @@ Plugin 'file-line' " Allow opening to a line from file name using :
|
|||||||
Plugin 'tpope/vim-fugitive' " Git integration
|
Plugin 'tpope/vim-fugitive' " Git integration
|
||||||
|
|
||||||
" -- Fuzzy Finders --
|
" -- Fuzzy Finders --
|
||||||
if ! exists('use_command_t')
|
Plugin 'ctrlpvim/ctrlp.vim' " Quick find files in project
|
||||||
let use_command_t = 1
|
|
||||||
end
|
|
||||||
" Needs Vim compiled with Ruby
|
|
||||||
" Quick find files in project
|
|
||||||
if use_command_t == 1 && has('ruby')
|
|
||||||
Plugin 'wincent/Command-T'
|
|
||||||
else
|
|
||||||
Plugin 'ctrlpvim/ctrlp.vim'
|
|
||||||
end
|
|
||||||
|
|
||||||
" -- Buffer Nav --
|
" -- Buffer Nav --
|
||||||
Plugin 'sandeepcr529/Buffet.vim' " Quick buffer switching
|
Plugin 'sandeepcr529/Buffet.vim' " Quick buffer switching
|
||||||
@ -319,60 +310,29 @@ nnoremap <silent> <F8> :TagbarToggle<CR>
|
|||||||
" Autofocus tagbar
|
" Autofocus tagbar
|
||||||
let g:tagbar_autofocus = 1
|
let g:tagbar_autofocus = 1
|
||||||
|
|
||||||
" ---------------
|
" CtrlP settings
|
||||||
" Command T and ctrlp.vim
|
" Ensure max height isn't too large. (for performance)
|
||||||
" Snagged from mutewinter @ https://github.com/mutewinter/dot_vim
|
let g:ctrlp_max_height = 10
|
||||||
" ---------------
|
" Conditional Mappings
|
||||||
|
let g:ctrlp_map = '<C-t>'
|
||||||
" Dynamically use Command T or ctrlp.vim based on availability of Ruby.
|
" Allow ctrl p to open over the initial nerdtree window
|
||||||
" We do this because Command T is much faster than ctrlp.vim.
|
let g:ctrlp_dont_split = 'netrw'
|
||||||
if use_command_t == 1 && has('ruby')
|
" Support tag jumping
|
||||||
" Use Command T since we've got Ruby
|
let g:ctrlp_extensions = ['tag', 'buffertag']
|
||||||
|
" Support Apex language
|
||||||
" Set the default escape keybinding to, you guessed it, escape.
|
let g:ctrlp_buftag_types = {
|
||||||
let g:CommandTCancelMap = '<esc>'
|
\ 'apex' : '--language-force=c#',
|
||||||
|
\ 'go' : {
|
||||||
" Ensure Ctrl-P isn't bound by default
|
\ 'bin' : 'gotags',
|
||||||
let g:ctrlp_map = ''
|
\ 'args' : '-sort -silent',
|
||||||
|
\}
|
||||||
" Ensure max height isn't too large. (for performance)
|
\}
|
||||||
let g:CommandTMaxHeight = 10
|
" Leader Commands
|
||||||
|
nnoremap <leader>b :CtrlPBuffer<CR>
|
||||||
" Mappings
|
nnoremap <leader>t :CtrlPBufTag<CR>
|
||||||
nnoremap <silent><C-t> :CommandT<CR>
|
nnoremap <leader>r :CtrlPTag<CR>
|
||||||
nnoremap <silent><C-b> :CommandTBuffer<CR>
|
nnoremap <leader>u :CtrlPCurFile<CR>
|
||||||
|
nnoremap <leader>m :CtrlPMRUFiles<CR>
|
||||||
" Leader Commands
|
|
||||||
nnoremap <leader>t :CommandT<CR>
|
|
||||||
nnoremap <leader>b :CommandTBuffer<CR>
|
|
||||||
nnoremap <leader>tt :CommandTTag<CR>
|
|
||||||
else
|
|
||||||
" Use ctrlp.vim since we don't have Ruby
|
|
||||||
|
|
||||||
" Ensure max height isn't too large. (for performance)
|
|
||||||
let g:ctrlp_max_height = 10
|
|
||||||
|
|
||||||
" Conditional Mappings
|
|
||||||
let g:ctrlp_map = '<C-t>'
|
|
||||||
|
|
||||||
" Allow ctrl p to open over the initial nerdtree window
|
|
||||||
"let g:ctrlp_dont_split = 'NERD_tree_2'
|
|
||||||
"let g:ctrlp_dont_split = 'NERD'
|
|
||||||
let g:ctrlp_dont_split = 'netrw'
|
|
||||||
|
|
||||||
" Support tag jumping
|
|
||||||
let g:ctrlp_extensions = ['tag', 'buffertag']
|
|
||||||
" Support Apex language
|
|
||||||
let g:ctrlp_buftag_types = {
|
|
||||||
\ 'apex' : '--language-force=c#',
|
|
||||||
\ }
|
|
||||||
|
|
||||||
" Leader Commands
|
|
||||||
nnoremap <leader>b :CtrlPBuffer<CR>
|
|
||||||
nnoremap <leader>t :CtrlPBufTag<CR>
|
|
||||||
nnoremap <leader>r :CtrlPTag<CR>
|
|
||||||
nnoremap <leader>u :CtrlPCurFile<CR>
|
|
||||||
nnoremap <leader>m :CtrlPMRUFiles<CR>
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" fugitive
|
" fugitive
|
||||||
|
Loading…
Reference in New Issue
Block a user