update vimrc
This commit is contained in:
parent
a4d3acc92c
commit
08db411ea4
2 changed files with 49 additions and 28 deletions
|
|
@ -96,7 +96,7 @@ let s:plug_src = 'https://github.com/junegunn/vim-plug.git'
|
|||
let s:plug_tab = get(s:, 'plug_tab', -1)
|
||||
let s:plug_buf = get(s:, 'plug_buf', -1)
|
||||
let s:mac_gui = has('gui_macvim') && has('gui_running')
|
||||
let s:is_win = has('win32') || has('win64')
|
||||
let s:is_win = has('win32')
|
||||
let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win)
|
||||
let s:vim8 = has('patch-8.0.0039') && exists('*job_start')
|
||||
let s:me = resolve(expand('<sfile>:p'))
|
||||
|
|
@ -2426,8 +2426,13 @@ function! s:diff()
|
|||
\ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : ''))
|
||||
|
||||
if cnts[0] || cnts[1]
|
||||
nnoremap <silent> <buffer> <cr> :silent! call <SID>preview_commit()<cr>
|
||||
nnoremap <silent> <buffer> o :silent! call <SID>preview_commit()<cr>
|
||||
nnoremap <silent> <buffer> <plug>(plug-preview) :silent! call <SID>preview_commit()<cr>
|
||||
if empty(maparg("\<cr>", 'n'))
|
||||
nmap <buffer> <cr> <plug>(plug-preview)
|
||||
endif
|
||||
if empty(maparg('o', 'n'))
|
||||
nmap <buffer> o <plug>(plug-preview)
|
||||
endif
|
||||
endif
|
||||
if cnts[0]
|
||||
nnoremap <silent> <buffer> X :call <SID>revert()<cr>
|
||||
|
|
|
|||
66
.vimrc
66
.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 'w0rp/ale'
|
||||
|
|
@ -103,7 +104,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'}
|
||||
|
|
@ -118,7 +121,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'
|
||||
|
|
@ -131,6 +134,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'
|
||||
|
|
@ -140,7 +144,7 @@ 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',
|
||||
|
|
@ -207,7 +211,7 @@ setlocal cursorline
|
|||
"
|
||||
" Change the source rank
|
||||
call deoplete#custom#option('sources', {
|
||||
\ 'python': ['LanguageClient'],
|
||||
\ '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'
|
||||
|
|
@ -323,6 +327,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
|
||||
|
|
@ -551,7 +565,6 @@ function AutoTrimWhitespace()
|
|||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
function InstallEverything()
|
||||
GoUpdateBinaries
|
||||
BlackUpgrade
|
||||
|
|
@ -568,7 +581,7 @@ 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 :VimFiler -status -auto-cd -parent<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>
|
||||
|
|
@ -615,24 +628,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>
|
||||
|
|
@ -651,7 +664,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>')
|
||||
|
|
@ -664,6 +677,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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue