fix up denite finally
This commit is contained in:
parent
61e46e7ba9
commit
bdbf88cfa6
1 changed files with 41 additions and 12 deletions
53
.vimrc
53
.vimrc
|
|
@ -407,12 +407,16 @@ 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}/*" '
|
||||
|
||||
"\ -g "*.{js,json,php,md,styl,jade,html,config,py,cpp,c,go,hs,rb,conf}"
|
||||
|
||||
command! -bang -nargs=* RipGrep call fzf#vim#grep(g:rg_command .shellescape(<q-args>), 1, <bang>0)
|
||||
command! -bang -nargs=* RipGrepCword call fzf#vim#grep(g:rg_command . "-q " . expand('<cword>'), 1, <bang>0)
|
||||
|
||||
let g:fzf_buffers_jump = 1
|
||||
" Empty value to disable preview window altogether
|
||||
let g:fzf_preview_window = ''
|
||||
|
||||
" * VimOrganizer
|
||||
" default Tag list. Will be changed in near future so
|
||||
|
|
@ -751,20 +755,29 @@ 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>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>
|
||||
nnoremap <silent> <Leader>ac :<C-u>Denite -resume -buffer-name=search-buffer grep<CR>
|
||||
nnoremap <silent> <Leader>aw :<C-u>DeniteCursorWord -buffer-name=search-buffer grep<CR>
|
||||
call denite#custom#map('insert', '<Enter>', '<C-o>')
|
||||
call denite#custom#var('grep', 'command', ['pt'])
|
||||
call denite#custom#var('grep', 'default_opts',
|
||||
\ ['--nogroup', '--nocolor', '--smart-case'])
|
||||
call denite#custom#var('grep', 'recursive_opts', [])
|
||||
call denite#custom#var('grep', 'pattern_opt', [])
|
||||
call denite#custom#var('grep', 'separator', ['--'])
|
||||
call denite#custom#var('grep', 'final_opts', [])
|
||||
call denite#custom#option('search-buffer', 'highlight_matched_char', 'deniteMatchedChar')
|
||||
"call denite#custom#var('grep', 'command', ['rg'])
|
||||
"call denite#custom#var('grep', 'default_opts',
|
||||
"\ ['--no-heading', '--color', 'never', '--smart-case'])
|
||||
"call denite#custom#var('grep', 'recursive_opts', [])
|
||||
"call denite#custom#var('grep', 'pattern_opt', [])
|
||||
"call denite#custom#var('grep', 'separator', ['--'])
|
||||
"call denite#custom#var('grep', 'final_opts', [])
|
||||
"call denite#custom#option('search-buffer', 'highlight_matched_char', 'deniteMatchedChar')
|
||||
call denite#custom#var('grep', {
|
||||
\ 'command': ['rg'],
|
||||
\ 'default_opts': ['-i', '--vimgrep', '--no-heading'],
|
||||
\ 'recursive_opts': [],
|
||||
\ 'pattern_opt': ['--regexp'],
|
||||
\ 'separator': ['--'],
|
||||
\ 'final_opts': [],
|
||||
\ })
|
||||
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-l> :<C-u>Files! `git rev-parse --show-toplevel`<CR>
|
||||
nnoremap <C-l> :<C-u>GFiles<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.
|
||||
|
|
@ -798,3 +811,19 @@ if !empty($VIRTUAL_ENV)
|
|||
" let g:python_host_prog = $VIRTUAL_ENV . '/bin/python'
|
||||
" let g:python3_host_prog = $VIRUTAL_ENV . '3/bin/python'
|
||||
endif
|
||||
|
||||
autocmd FileType denite call s:denite_my_settings()
|
||||
function! s:denite_my_settings() abort
|
||||
nnoremap <silent><buffer><expr> <CR>
|
||||
\ denite#do_map('do_action')
|
||||
"nnoremap <silent><buffer><expr> d
|
||||
"\ denite#do_map('do_action', 'delete')
|
||||
"nnoremap <silent><buffer><expr> p
|
||||
"\ denite#do_map('do_action', 'preview')
|
||||
nnoremap <silent><buffer><expr> q
|
||||
\ denite#do_map('quit')
|
||||
nnoremap <silent><buffer><expr> i
|
||||
\ denite#do_map('open_filter_buffer')
|
||||
nnoremap <silent><buffer><expr> <Space>
|
||||
\ denite#do_map('toggle_select').'j'
|
||||
endfunction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue