update vimrc

This commit is contained in:
Barak Michener 2018-08-09 14:52:49 -07:00
parent 08d397da50
commit 52d740b545

81
.vimrc
View file

@ -55,6 +55,7 @@ set completeopt=menu,menuone,longest
set t_Co=256
set t_Sf=ESC[3%dm
set t_Sb=ESC[4%dm
"set t_SH=
"set t_kb=
" This is like HiglightTooLongLines below, but for modern vim. The problem is
@ -85,7 +86,7 @@ Plug 'hsitz/VimOrganizer'
Plug 'mattn/calendar-vim'
Plug 'sjbach/lusty'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdtree'
"Plug 'scrooloose/nerdtree'
Plug 'rstacruz/sparkup'
Plug 'scrooloose/syntastic'
Plug 'tpope/vim-fugitive'
@ -101,7 +102,9 @@ Plug 'b4winckler/vim-angry'
Plug 'tristen/vim-sparkup'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'kien/ctrlp.vim'
"Plug 'kien/ctrlp.vim'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'bling/vim-bufferline'
Plug 'majutsushi/tagbar'
Plug 'eagletmt/neco-ghc', {'for': 'haskell'}
@ -116,7 +119,7 @@ Plug 'tpope/vim-surround'
Plug 'fatih/vim-go'
"Plug 't-yuki/vim-go-coverlay'
Plug 'tpope/vim-abolish'
Plug 'hylang/vim-hy'
Plug 'hylang/vim-hy', {'for': 'hy'}
Plug 'jiangmiao/auto-pairs'
Plug 'racer-rust/vim-racer', {'for': 'rust'}
Plug 'let-def/vimbufsync'
@ -129,6 +132,7 @@ Plug 'Shougo/context_filetype.vim'
Plug 'sheerun/vim-polyglot'
Plug 'Shougo/denite.nvim'
Plug 'plytophogy/vim-virtualenv'
"Plug 'vim-scripts/fish-syntax'
"Plug 'kchmck/vim-coffee-script'
"Plug 'rodjek/vim-puppet'
@ -138,7 +142,13 @@ Plug 'Shougo/denite.nvim'
"Plug 'HerringtonDarkholme/yats.vim'
Plug 'tpope/vim-fireplace'
Plug 'junegunn/vim-easy-align'
Plug 'idris-hackers/idris-vim'
Plug 'idris-hackers/idris-vim', {'for': 'idris'}
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
Plug 'ambv/black'
call plug#end()
@ -197,6 +207,13 @@ setlocal cursorline
" ** PLUGIN CONFIGURATION **
"
" Change the source rank
call deoplete#custom#option('sources', {
\ 'python': ['LanguageClient', 'jedi'],
\})
call deoplete#custom#source('buffer', 'rank', 1)
let g:deoplete#sources#clang#libclang_path = '/usr/lib/llvm-6.0/lib/libclang.so'
let g:deoplete#sources#clang#clang_header = '/usr/lib/llvm-6.0/lib/clang'
let g:deoplete#enable_at_startup = 1
" * Vim general/Unknown
let python_highlight_all = 1
@ -292,6 +309,16 @@ let g:UltiSnipsJumpBackwardTrigger="<Leader><s-,>"
let g:CommandTMaxFiles = 1000
let g:CommandTMaxDepth = 7
" * FZF
let g:rg_command = '
\ rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --color "always"
\ -g "*.{js,json,php,md,styl,jade,html,config,py,cpp,c,go,hs,rb,conf}"
\ -g "!{.git,node_modules,vendor}/*" '
command! -bang -nargs=* RipGrep call fzf#vim#grep(g:rg_command .shellescape(<q-args>), 1, <bang>0)
let g:fzf_buffers_jump = 1
" * VimOrganizer
" default Tag list. Will be changed in near future so
" that these are defined by config lines in each .org
@ -520,6 +547,10 @@ function AutoTrimWhitespace()
endif
endfunction
function InstallEverything()
GoUpdateBinaries
BlackUpgrade
endfunction
" ** KEY REMAPPINGS **
"
" I used to use tabs, but then I took an arrow to the knee.
@ -531,7 +562,8 @@ endfunction
" I don't know how I came up with gt for opening the tree, but it stuck.
"nmap gt :NERDTreeToggle<CR>
nmap <silent> gt :VimFilerExplorer -winwidth=40 -toggle -direction=rightbelow -parent -status -force-hide<CR>
"nmap <silent> gt :VimFilerExplorer -winwidth=40 -toggle -direction=rightbelow -parent -status -force-hide<CR>
nmap <silent> gt :VimFiler -status -auto-cd -parent -force-quit<CR>
" The same for the TagList, useful for large C files.
"nmap gb :TlistToggle<CR>
nmap gb :TagbarToggle<CR>
@ -578,24 +610,24 @@ inoremap <C-e> <C-O>$
" Dealing with split windows is a pain. Make it less of a pain, by making
" Ctrl-direction appropriate.
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-h> <C-w>h
"nnoremap <C-j> <C-w>w
"nnoremap <C-k> <C-w>W
inoremap <C-j> <C-w>j
inoremap <C-k> <C-w>k
inoremap <C-l> <C-w>l
inoremap <C-h> <C-w>h
"nnoremap <C-j> <C-w>j
"nnoremap <C-k> <C-w>k
"nnoremap <C-l> <C-w>l
"nnoremap <C-h> <C-w>h
""nnoremap <C-j> <C-w>w
""nnoremap <C-k> <C-w>W
"inoremap <C-j> <C-w>j
"inoremap <C-k> <C-w>k
"inoremap <C-l> <C-w>l
"inoremap <C-h> <C-w>h
if has('nvim')
tnoremap <Esc> <C-\><C-n>
tnoremap <C-j> <C-\><C-n><C-w>j
tnoremap <C-k> <C-\><C-n><C-w>k
tnoremap <C-l> <C-\><C-n><C-w>l
tnoremap <C-h> <C-\><C-n><C-w>h
endif
"if has('nvim')
"tnoremap <Esc> <C-\><C-n>
"tnoremap <C-j> <C-\><C-n><C-w>j
"tnoremap <C-k> <C-\><C-n><C-w>k
"tnoremap <C-l> <C-\><C-n><C-w>l
"tnoremap <C-h> <C-\><C-n><C-w>h
"endif
" Better fold mappings
nnoremap <silent> <Space> @=(foldlevel('.')?'za':'l')<CR>
@ -614,7 +646,7 @@ nnoremap <Leader>ss :SyntasticSetLoclist<CR>
nnoremap <Leader>fn :lnext<CR>
" Prev quickfix.
nnoremap <Leader>fp :lprev<CR>
nnoremap <silent> <Leader>aa :<C-u>Denite -mode=normal -buffer-name=search-buffer grep<CR>
"nnoremap <silent> <Leader>aa :<C-u>Denite -mode=normal -buffer-name=search-buffer grep<CR>
nnoremap <silent> <Leader>ac :<C-u>Denite -resume -mode=normal -buffer-name=search-buffer<CR>
nnoremap <silent> <Leader>aw :<C-u>DeniteCursorWord -mode=normal -buffer-name=search-buffer grep<CR>
call denite#custom#map('insert', '<Enter>', '<C-o>')
@ -627,6 +659,9 @@ call denite#custom#var('grep', 'separator', ['--'])
call denite#custom#var('grep', 'final_opts', [])
call denite#custom#option('search-buffer', 'highlight_matched_char', 'deniteMatchedChar')
nnoremap <silent> <Leader>g :<C-u>Denite -buffer-name=search-buffer grep<CR>
nnoremap <silent> <Leader>aa :<C-u>RipGrep!<CR>
nnoremap <C-l> :<C-u>Files! `git rev-parse --show-toplevel`<CR>
nnoremap <C-k> :<C-u>Buffers<CR>
" For C++ -- A is a great plugin which allows you to jump from the c file to the
" header and vice-versa. Mneumonic here is headerheader.
nnoremap <Leader>hh :A<CR>