From 52d740b5455d59bea89419e2e0d3779988722266 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Thu, 9 Aug 2018 14:52:49 -0700 Subject: [PATCH] update vimrc --- .vimrc | 81 +++++++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/.vimrc b/.vimrc index db9465f..22d0165 100644 --- a/.vimrc +++ b/.vimrc @@ -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="" 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(), 1, 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 -nmap gt :VimFilerExplorer -winwidth=40 -toggle -direction=rightbelow -parent -status -force-hide +"nmap gt :VimFilerExplorer -winwidth=40 -toggle -direction=rightbelow -parent -status -force-hide +nmap gt :VimFiler -status -auto-cd -parent -force-quit " The same for the TagList, useful for large C files. "nmap gb :TlistToggle nmap gb :TagbarToggle @@ -578,24 +610,24 @@ inoremap $ " Dealing with split windows is a pain. Make it less of a pain, by making " Ctrl-direction appropriate. -nnoremap j -nnoremap k -nnoremap l -nnoremap h -"nnoremap w -"nnoremap W -inoremap j -inoremap k -inoremap l -inoremap h +"nnoremap j +"nnoremap k +"nnoremap l +"nnoremap h +""nnoremap w +""nnoremap W +"inoremap j +"inoremap k +"inoremap l +"inoremap h -if has('nvim') - tnoremap - tnoremap j - tnoremap k - tnoremap l - tnoremap h -endif +"if has('nvim') + "tnoremap + "tnoremap j + "tnoremap k + "tnoremap l + "tnoremap h +"endif " Better fold mappings nnoremap @=(foldlevel('.')?'za':'l') @@ -614,7 +646,7 @@ nnoremap ss :SyntasticSetLoclist nnoremap fn :lnext " Prev quickfix. nnoremap fp :lprev -nnoremap aa :Denite -mode=normal -buffer-name=search-buffer grep +"nnoremap aa :Denite -mode=normal -buffer-name=search-buffer grep nnoremap ac :Denite -resume -mode=normal -buffer-name=search-buffer nnoremap aw :DeniteCursorWord -mode=normal -buffer-name=search-buffer grep call denite#custom#map('insert', '', '') @@ -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 g :Denite -buffer-name=search-buffer grep +nnoremap aa :RipGrep! +nnoremap :Files! `git rev-parse --show-toplevel` +nnoremap :Buffers " 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 hh :A