nvim: Switch to ferret & drop our bare bones grepper
See ferret's README for the advantages. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
6bca8ccaad
commit
8ea80b9af7
4 changed files with 8 additions and 33 deletions
|
@ -1,5 +1,3 @@
|
||||||
" Always open QF window at the bottom
|
|
||||||
wincmd J
|
|
||||||
" Quit vim if the last window is qf
|
" Quit vim if the last window is qf
|
||||||
autocmd BufEnter <buffer> if winnr('$') < 2| q | endif
|
autocmd BufEnter <buffer> if winnr('$') < 2| q | endif
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
call plug#begin('~/.config/nvim/plugged')
|
call plug#begin('~/.config/nvim/plugged')
|
||||||
|
|
||||||
" Motions
|
" Vertical Motion
|
||||||
Plug 'haya14busa/incsearch.vim'
|
|
||||||
Plug 'justinmk/vim-sneak'
|
Plug 'justinmk/vim-sneak'
|
||||||
" Fuzzy search
|
" Search
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||||
Plug 'junegunn/fzf.vim'
|
Plug 'junegunn/fzf.vim'
|
||||||
|
Plug 'haya14busa/incsearch.vim'
|
||||||
|
Plug 'wincent/ferret'
|
||||||
" Remove extraneous whitespace when edit mode is exited
|
" Remove extraneous whitespace when edit mode is exited
|
||||||
Plug 'axelf4/vim-strip-trailing-whitespace'
|
Plug 'axelf4/vim-strip-trailing-whitespace'
|
||||||
" Manage Project sessions
|
" Manage Project sessions
|
||||||
|
@ -32,7 +33,6 @@ Plug 'sbdchd/neoformat'
|
||||||
Plug 'hauleth/asyncdo.vim'
|
Plug 'hauleth/asyncdo.vim'
|
||||||
" Quickfix
|
" Quickfix
|
||||||
Plug 'ronakg/quickr-cscope.vim'
|
Plug 'ronakg/quickr-cscope.vim'
|
||||||
Plug 'stefandtw/quickfix-reflector.vim'
|
|
||||||
Plug 'milkypostman/vim-togglelist'
|
Plug 'milkypostman/vim-togglelist'
|
||||||
Plug 'yssl/QFEnter'
|
Plug 'yssl/QFEnter'
|
||||||
" Text Object plugins
|
" Text Object plugins
|
||||||
|
|
|
@ -73,10 +73,8 @@ nnoremap [q :cprevious<CR>
|
||||||
nnoremap ]q :cnext<CR>
|
nnoremap ]q :cnext<CR>
|
||||||
nnoremap [Q :cfirst<CR>
|
nnoremap [Q :cfirst<CR>
|
||||||
nnoremap ]Q :clast<CR>
|
nnoremap ]Q :clast<CR>
|
||||||
nnoremap qs :Grep<SPACE>
|
nnoremap q* :Ggrep! <cword><CR>
|
||||||
nnoremap q* :Grep <cword><CR>
|
nnoremap qs :Ggrep!<SPACE>
|
||||||
nnoremap qg :Ggrep! <cword><CR>
|
|
||||||
nnoremap qG :Ggrep!<SPACE>
|
|
||||||
nnoremap qt :call ToggleQuickfixList()<CR>
|
nnoremap qt :call ToggleQuickfixList()<CR>
|
||||||
nnoremap Lo :lopen<CR>
|
nnoremap Lo :lopen<CR>
|
||||||
nnoremap Lc :lclose<CR>
|
nnoremap Lc :lclose<CR>
|
||||||
|
@ -84,10 +82,8 @@ nnoremap [l :lprevious<CR>
|
||||||
nnoremap ]l :lnext<CR>
|
nnoremap ]l :lnext<CR>
|
||||||
nnoremap [L :lfirst<CR>
|
nnoremap [L :lfirst<CR>
|
||||||
nnoremap ]L :llast<CR>
|
nnoremap ]L :llast<CR>
|
||||||
nnoremap Ls :LGrep<SPACE>
|
nnoremap L* :Glgrep! <cword><CR>
|
||||||
nnoremap L* :LGrep <cword><CR>
|
nnoremap Ls :Glgrep!<SPACE>
|
||||||
nnoremap Lg :Glgrep! <cword><CR>
|
|
||||||
nnoremap LG :Glgrep!<SPACE>
|
|
||||||
nnoremap Lt :call ToggleLocationList()<CR>
|
nnoremap Lt :call ToggleLocationList()<CR>
|
||||||
" Preview tags
|
" Preview tags
|
||||||
nnoremap pt :ptag <C-R><C-W><CR>
|
nnoremap pt :ptag <C-R><C-W><CR>
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
if executable('rg')
|
|
||||||
set grepprg=rg\ --vimgrep\ --no-heading\ --smart-case
|
|
||||||
set grepformat=%f:%l:%c:%m,%f:%l%m,%f\ \ %l%m
|
|
||||||
elseif executable('ag')
|
|
||||||
set grepprg=ag\ --nogroup\ --nocolor\ --vimgrep
|
|
||||||
set grepformat^=%f:%l:%c:%m
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Taken from https://github.com/hauleth/dotfiles/blob/master/vim/.config/nvim/init.vim
|
|
||||||
command! -bang -nargs=* -complete=dir Grep call asyncdo#run(<bang>0,
|
|
||||||
\ { 'job': &grepprg, 'errorformat': &grepformat }, <f-args>)
|
|
||||||
command! -bang -nargs=* -complete=dir LGrep call asyncdo#lrun(<bang>0,
|
|
||||||
\ { 'job': &grepprg, 'errorformat': &grepformat }, <f-args>)
|
|
||||||
|
|
||||||
augroup GrepperQFOpen
|
|
||||||
autocmd!
|
|
||||||
autocmd QuickFixCmdPost [^l]* nested cwindow
|
|
||||||
autocmd QuickFixCmdPost l* nested lwindow
|
|
||||||
augroup END
|
|
Loading…
Reference in a new issue