2015-08-13 22:28:46 +00:00
|
|
|
|
" Functions {{
|
2015-03-27 00:54:29 +00:00
|
|
|
|
function! s:smart_source_rc(name)
|
|
|
|
|
call s:source_rc(a:name . '.rc.vim')
|
|
|
|
|
call s:source_rc(a:name . '.local.rc.vim')
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
function! s:source_rc(path)
|
|
|
|
|
let l:f_path = fnameescape(expand('~/.vim/rc/' . a:path))
|
|
|
|
|
if filereadable(l:f_path)
|
|
|
|
|
execute 'source' . l:f_path
|
|
|
|
|
endif
|
|
|
|
|
endfunction
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" }} Functions
|
2015-03-27 00:54:29 +00:00
|
|
|
|
|
2015-03-26 17:09:26 +00:00
|
|
|
|
" Navigation {{
|
|
|
|
|
Plug 'file-line'
|
|
|
|
|
Plug 'tpope/vim-vinegar'
|
|
|
|
|
Plug 'sandeepcr529/Buffet.vim', { 'on': 'Bufferlist' }
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" Buffet {{
|
2015-03-26 17:09:26 +00:00
|
|
|
|
nnoremap <silent> <F2> :Bufferlist<CR>
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" }} Buffet
|
|
|
|
|
|
|
|
|
|
" }} Navigation
|
|
|
|
|
|
|
|
|
|
" Git {{
|
|
|
|
|
Plug 'tpope/vim-fugitive' " , { 'on': ['Gblame', 'Gdiff', 'Gcommit', 'Gstatus', 'Gwrite'] }
|
|
|
|
|
" vim-fugitive {{
|
|
|
|
|
nnoremap <leader>gb :Gblame<CR>
|
|
|
|
|
nnoremap <leader>gc :Gcommit<CR>
|
|
|
|
|
nnoremap <leader>gd :Gdiff<CR>
|
|
|
|
|
nnoremap <leader>gs :Gstatus<CR>
|
|
|
|
|
nnoremap <leader>gw :Gwrite<CR>
|
|
|
|
|
" }} vim-fugitive
|
|
|
|
|
|
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
|
|
|
|
" vim-gitgutter {{
|
|
|
|
|
let g:gitgutter_enabled = 1
|
|
|
|
|
" Will toggle signs when I want them
|
|
|
|
|
let g:gitgutter_signs = 0
|
|
|
|
|
" Already using Fugitive, don't need more mappings
|
|
|
|
|
let g:gitgutter_map_keys = 0
|
|
|
|
|
" Make it more passive
|
|
|
|
|
let g:gitgutter_eager = 0
|
|
|
|
|
let g:gitgutter_realtime = 0
|
|
|
|
|
" Quick leader command to toggle git-gutter
|
|
|
|
|
nmap <leader>gg :GitGutterSignsToggle<CR>
|
|
|
|
|
" }} vim-gitgutter
|
2015-03-26 17:09:26 +00:00
|
|
|
|
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" }} Git
|
2015-03-27 00:45:03 +00:00
|
|
|
|
|
2015-08-13 22:28:46 +00:00
|
|
|
|
|
|
|
|
|
" Fuzzy Find {{
|
2015-03-27 00:45:03 +00:00
|
|
|
|
Plug 'ctrlpvim/ctrlp.vim'
|
2015-04-28 19:01:33 +00:00
|
|
|
|
call s:smart_source_rc('plugins/ctrlp')
|
2015-04-28 23:50:32 +00:00
|
|
|
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install' }
|
2015-03-27 00:45:03 +00:00
|
|
|
|
" ag / ack {{
|
2015-03-26 17:09:26 +00:00
|
|
|
|
if executable('ag')
|
|
|
|
|
Plug 'rking/ag.vim'
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" ag.vim {{
|
|
|
|
|
nmap <leader>a :Ag<Space>
|
|
|
|
|
nmap <leader>i* :Ag<Space>-i<Space>'\b<c-r><c-W>\b'<CR>
|
|
|
|
|
nmap <leader>* :Ag<Space>'\b<c-r><c-W>\b'<CR>
|
|
|
|
|
command! Todo Ag! TODO
|
|
|
|
|
" }} ag.vim
|
2015-04-28 19:01:33 +00:00
|
|
|
|
elseif executable('ack')
|
2015-03-26 17:09:26 +00:00
|
|
|
|
Plug 'mileszs/ack.vim'
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" ack.vim {{
|
|
|
|
|
nmap <leader>a :Ack<Space>
|
|
|
|
|
nmap <leader>i* :Ack<Space>-i<Space>'\b<c-r><c-W>\b'<CR>
|
|
|
|
|
nmap <leader>* :Ack<Space>'\<<c-r><c-W>\>'<CR>
|
|
|
|
|
command! Todo Ack! TODO
|
|
|
|
|
" }} ack.vim
|
2015-03-26 17:09:26 +00:00
|
|
|
|
endif
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" }} ag /ack
|
|
|
|
|
|
|
|
|
|
" }} Fuzzy Find
|
2015-03-26 17:09:26 +00:00
|
|
|
|
|
|
|
|
|
" Autocomplete {{
|
|
|
|
|
if has('lua')
|
|
|
|
|
Plug 'Shougo/neocomplete.vim'
|
2015-06-18 16:27:57 +00:00
|
|
|
|
call s:smart_source_rc('plugins/neocomplete')
|
2015-03-26 17:09:26 +00:00
|
|
|
|
else
|
|
|
|
|
Plug 'Shougo/neocomplcache.vim'
|
2015-06-18 16:27:57 +00:00
|
|
|
|
call s:smart_source_rc('plugins/neocomplcache')
|
2015-03-26 17:09:26 +00:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
" Programming {{
|
2015-08-17 23:45:12 +00:00
|
|
|
|
Plug 'kassio/neoterm'
|
2015-03-27 00:45:03 +00:00
|
|
|
|
Plug 'majutsushi/tagbar'
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" tagbar {{
|
|
|
|
|
nnoremap <silent> <F8> :TagbarToggle<CR>
|
|
|
|
|
let g:tagbar_autofocus = 1 " Autofocus tagbar
|
|
|
|
|
" }} tagbar
|
|
|
|
|
Plug 'ludovicchabant/vim-gutentags' " Auto generate tags files
|
|
|
|
|
Plug 'tpope/vim-surround'
|
|
|
|
|
Plug 'tomtom/tcomment_vim' " , { 'on': ['TComment', 'TCommentBlock'] }
|
|
|
|
|
" tcomment_vim {{
|
|
|
|
|
nnoremap // :TComment<CR>
|
|
|
|
|
vnoremap // :TCommentBlock<CR>
|
|
|
|
|
" }} tcomment_vim
|
2015-03-27 00:45:03 +00:00
|
|
|
|
if !has('nvim')
|
|
|
|
|
" Only use if not neovim, on neovim we have Neomake
|
2015-04-28 19:01:33 +00:00
|
|
|
|
Plug 'scrooloose/syntastic'
|
|
|
|
|
call s:smart_source_rc('plugins/syntastic')
|
2015-03-27 00:45:03 +00:00
|
|
|
|
endif
|
|
|
|
|
" }}
|
2015-03-26 17:09:26 +00:00
|
|
|
|
|
|
|
|
|
" GUI {{
|
2015-08-14 05:43:20 +00:00
|
|
|
|
Plug 'mhinz/vim-startify'
|
|
|
|
|
call s:smart_source_rc('plugins/startify')
|
2015-03-27 00:45:03 +00:00
|
|
|
|
Plug 'bling/vim-airline'
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" vim-airline {{
|
|
|
|
|
" Use short-form mode text
|
|
|
|
|
let g:airline_mode_map = {
|
|
|
|
|
\ '__' : '-',
|
|
|
|
|
\ 'n' : 'N',
|
|
|
|
|
\ 'i' : 'I',
|
|
|
|
|
\ 'R' : 'R',
|
|
|
|
|
\ 'c' : 'C',
|
|
|
|
|
\ 'v' : 'V',
|
|
|
|
|
\ 'V' : 'V',
|
|
|
|
|
\ '' : 'V',
|
|
|
|
|
\ 's' : 'S',
|
|
|
|
|
\ 'S' : 'S',
|
|
|
|
|
\ '' : 'S',
|
|
|
|
|
\ }
|
|
|
|
|
" abbreviate trailing whitespace and mixed indent
|
|
|
|
|
let g:airline#extensions#whitespace#trailing_format = 'tw[%s]'
|
|
|
|
|
let g:airline#extensions#whitespace#mixed_indent_format = 'i[%s]'
|
|
|
|
|
" Vertical separators for all
|
|
|
|
|
let g:airline_left_sep=''
|
|
|
|
|
let g:airline_left_alt_sep=''
|
|
|
|
|
let g:airline_right_sep=''
|
|
|
|
|
let g:airline_right_alt_sep=''
|
|
|
|
|
let g:airline#extensions#tabline#enabled = 1
|
|
|
|
|
let g:airline#extensions#tabline#left_sep = ' '
|
|
|
|
|
let g:airline#extensions#tabline#left_alt_sep = '|'
|
|
|
|
|
" }} vim-airline
|
|
|
|
|
" Highlight matching tags
|
2015-03-26 17:09:26 +00:00
|
|
|
|
Plug 'gregsexton/MatchTag'
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" Integrate with Dash
|
2015-06-16 01:02:23 +00:00
|
|
|
|
Plug 'rizzatti/dash.vim'
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" dash.vim {{
|
2015-06-16 01:02:23 +00:00
|
|
|
|
nmap <silent> <leader>d <Plug>DashSearch
|
|
|
|
|
let g:dash_map = {
|
|
|
|
|
\ 'apex' : 'apex',
|
|
|
|
|
\ 'visualforce' : 'vf',
|
|
|
|
|
\ }
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" }} dash.vim
|
|
|
|
|
|
|
|
|
|
" }} GUI
|
2015-03-26 17:09:26 +00:00
|
|
|
|
|
|
|
|
|
" Filetypes {{
|
2015-03-31 20:48:21 +00:00
|
|
|
|
" Plug 'PreserveNoEOL'
|
2015-08-13 22:28:46 +00:00
|
|
|
|
" noeol {{
|
|
|
|
|
" let g:PreserveNoEOL = 1
|
|
|
|
|
" }} noeol
|
2015-03-26 17:09:26 +00:00
|
|
|
|
Plug 'ViViDboarder/vim-forcedotcom'
|
|
|
|
|
Plug 'avakhov/vim-yaml'
|
2015-06-16 01:01:57 +00:00
|
|
|
|
Plug 'dag/vim-fish'
|
2015-03-26 17:09:26 +00:00
|
|
|
|
Plug 'dart-lang/dart-vim-plugin'
|
|
|
|
|
Plug 'fatih/vim-go'
|
|
|
|
|
Plug 'groovy.vim'
|
|
|
|
|
Plug 'hsanson/vim-android'
|
|
|
|
|
Plug 'pangloss/vim-javascript'
|
|
|
|
|
Plug 'pdurbin/vim-tsv'
|
|
|
|
|
Plug 'tfnico/vim-gradle'
|
2015-03-31 20:48:21 +00:00
|
|
|
|
Plug 'tmux-plugins/vim-tmux'
|
2015-03-27 00:45:03 +00:00
|
|
|
|
" }}
|
|
|
|
|
|
2015-03-26 17:09:26 +00:00
|
|
|
|
" Python {{
|
2015-03-27 00:45:03 +00:00
|
|
|
|
Plug 'alfredodeza/coveragepy.vim'
|
|
|
|
|
Plug 'alfredodeza/pytest.vim'
|
2015-08-17 23:37:29 +00:00
|
|
|
|
" pytest.vim {{
|
|
|
|
|
nmap <silent><leader>ptp <Esc>:Pytest project<CR>
|
|
|
|
|
nmap <silent><leader>ptf <Esc>:Pytest file<CR>
|
|
|
|
|
nmap <silent><leader>ptm <Esc>:Pytest method<CR>
|
|
|
|
|
" }} pytest.vim
|
2015-03-27 00:45:03 +00:00
|
|
|
|
Plug 'davidhalter/jedi-vim'
|
2015-08-14 05:43:20 +00:00
|
|
|
|
" jedi-vim {{
|
|
|
|
|
let g:jedi#completions_enabled = 0
|
|
|
|
|
let g:jedi#auto_vim_configuration = 0
|
|
|
|
|
" }} jedi-vim
|
2015-03-27 00:45:03 +00:00
|
|
|
|
Plug 'klen/python-mode'
|
2015-08-14 05:43:20 +00:00
|
|
|
|
" python-mode {{
|
|
|
|
|
let g:pymode_breakpoint = 0
|
|
|
|
|
let g:pymode_lint = 0
|
|
|
|
|
let g:pymode_lint_checkers = ['flake8']
|
|
|
|
|
let g:pymode_lint_on_write = 0
|
|
|
|
|
let g:pymode_rope = 0
|
|
|
|
|
let g:pymode_rope_complete_on_dot = 0
|
|
|
|
|
let g:pymode_rope_completion = 0
|
|
|
|
|
" }} python-mode
|
|
|
|
|
|
2015-03-26 17:09:26 +00:00
|
|
|
|
" }}
|
|
|
|
|
|
|
|
|
|
" Themes {{
|
|
|
|
|
Plug 'altercation/vim-colors-solarized'
|
|
|
|
|
Plug 'candy.vim'
|
|
|
|
|
Plug 'eclipse.vim'
|
|
|
|
|
Plug 'morhetz/gruvbox'
|
|
|
|
|
Plug 'nanotech/jellybeans.vim'
|
|
|
|
|
Plug 'nuvola.vim'
|
|
|
|
|
Plug 'summerfruit256.vim'
|
|
|
|
|
Plug 'therubymug/vim-pyte'
|
|
|
|
|
Plug 'vividchalk.vim'
|
|
|
|
|
Plug 'wombat256.vim'
|
|
|
|
|
" }}
|
|
|
|
|
|
|
|
|
|
" System {{
|
2015-03-27 00:45:03 +00:00
|
|
|
|
" neomake / vim-dispatch {{
|
|
|
|
|
if has('nvim')
|
|
|
|
|
Plug 'benekastah/neomake'
|
2015-08-14 05:43:20 +00:00
|
|
|
|
" neomake {{
|
|
|
|
|
nmap <leader>nm :Neomake<CR>
|
|
|
|
|
nnoremap <F5> :Neomake<CR>
|
|
|
|
|
let g:neomake_python_enabled_makers = ['flake8']
|
|
|
|
|
" }} neomake
|
2015-03-27 00:45:03 +00:00
|
|
|
|
else
|
|
|
|
|
Plug 'tpope/vim-dispatch'
|
2015-04-28 19:01:33 +00:00
|
|
|
|
nnoremap <F5> :Make<CR>
|
|
|
|
|
command! TagsUpdate Dispatch ctags -R .
|
2015-03-27 00:45:03 +00:00
|
|
|
|
endif
|
|
|
|
|
" }}
|
2015-03-26 17:09:26 +00:00
|
|
|
|
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
|
|
|
|
|
Plug 'tpope/vim-repeat'
|
2015-06-16 01:01:57 +00:00
|
|
|
|
Plug 'tpope/vim-endwise'
|
2015-03-26 17:09:26 +00:00
|
|
|
|
" emacs bindinds in insert
|
|
|
|
|
Plug 'tpope/vim-rsi'
|
2015-05-21 20:51:59 +00:00
|
|
|
|
Plug 'milkypostman/vim-togglelist'
|
2015-08-14 05:43:20 +00:00
|
|
|
|
" vim-togglelist {{
|
|
|
|
|
nnoremap <silent> <F6> :call ToggleQuickfixList()<CR>
|
|
|
|
|
nnoremap <silent> <F7> :call ToggleLocationList()<CR>
|
|
|
|
|
" }} vim-togglelist
|
|
|
|
|
|
2015-03-26 17:09:26 +00:00
|
|
|
|
" }}
|