114 lines
3.1 KiB
VimL
114 lines
3.1 KiB
VimL
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
" Important:
|
|
" This requires that you install https://github.com/amix/vimrc !
|
|
"
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
" => Load pathogen paths
|
|
""""""""""""""""""""""""""""""
|
|
let s:vim_runtime = expand('<sfile>:p:h')."/.."
|
|
call pathogen#infect(s:vim_runtime.'/sources_forked/{}')
|
|
call pathogen#infect(s:vim_runtime.'/sources_non_forked/{}')
|
|
call pathogen#infect(s:vim_runtime.'/my_plugins/{}')
|
|
call pathogen#helptags()
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
" => bufExplorer plugin
|
|
""""""""""""""""""""""""""""""
|
|
let g:bufExplorerDefaultHelp=0
|
|
let g:bufExplorerShowRelativePath=1
|
|
let g:bufExplorerFindActive=1
|
|
let g:bufExplorerSortBy='name'
|
|
map <leader>o :BufExplorer<cr>
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
" => MRU plugin
|
|
""""""""""""""""""""""""""""""
|
|
let MRU_Max_Entries = 400
|
|
map <leader>f :MRU<CR>
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
" => YankStack
|
|
""""""""""""""""""""""""""""""
|
|
let g:yankstack_yank_keys = ['y', 'd']
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
" => CTRL-P
|
|
""""""""""""""""""""""""""""""
|
|
let g:ctrlp_working_path_mode = 0
|
|
|
|
" Quickly find and open a file in the current working directory
|
|
let g:ctrlp_map = '<C-f>'
|
|
map <leader>j :CtrlP<cr>
|
|
|
|
" Quickly find and open a buffer
|
|
map <leader>b :CtrlPBuffer<cr>
|
|
|
|
" Quickly find and open a recently opened file
|
|
map <leader>f :CtrlPMRU<CR>
|
|
|
|
let g:ctrlp_max_height = 20
|
|
let g:ctrlp_custom_ignore = 'node_modules\|^\.DS_Store\|^\.git\|^\.coffee'
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
" => snipMate (beside <TAB> support <CTRL-j>)
|
|
""""""""""""""""""""""""""""""
|
|
ino <C-j> <C-r>=snipMate#TriggerSnippet()<cr>
|
|
snor <C-j> <esc>i<right><C-r>=snipMate#TriggerSnippet()<cr>
|
|
|
|
|
|
""""""""""""""""""""""""""""""
|
|
" => Vim grep
|
|
""""""""""""""""""""""""""""""
|
|
let Grep_Skip_Dirs = 'RCS CVS SCCS .svn generated'
|
|
set grepprg=/bin/grep\ -nH
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
" => Nerd Tree
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
let g:NERDTreeWinPos = "right"
|
|
let NERDTreeShowHidden=0
|
|
let NERDTreeIgnore = ['\.pyc$', '__pycache__']
|
|
let g:NERDTreeWinSize=35
|
|
map <leader>nn :NERDTreeToggle<cr>
|
|
map <leader>nb :NERDTreeFromBookmark<Space>
|
|
map <leader>nf :NERDTreeFind<cr>
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
" => surround.vim config
|
|
" Annotate strings with gettext
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
vmap Si S(i_<esc>f)
|
|
au FileType mako vmap Si S"i${ _(<esc>2f"a) }<esc>
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
" => lightline
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
let g:lightline = {
|
|
\ 'colorscheme': 'gruvbox',
|
|
\ 'active': {
|
|
\ 'left': [ [ 'mode', 'paste' ],
|
|
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
|
\ },
|
|
\ 'component_function': {
|
|
\ 'gitbranch': 'FugitiveHead'
|
|
\ },
|
|
\ }
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
" => Git gutter (Git diff)
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
let g:gitgutter_enabled=0
|
|
nnoremap <silent> <leader>d :GitGutterToggle<cr>
|