Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
992 views
in Technique[技术] by (71.8m points)

grep - Neovim - vim-grepper shows no result

I use Vim daily and use vim-grepper (https://github.com/mhinz/vim-grepper) as my grep plugin.

But since last week, it doesn't work anymore and every request I do result in... nothing found.

I tried to PlugUpdate, uninstall then reinstall it again, tried to do a basic grep :grep 'my_pattern' /my_project, I even tried installing an other grepper plugin but no result so far...

I have no idea what could have cause since I rarely update my vim config file and I'm not good enought yet at touching vim stuff, the only recent thing I did was source % on my config file but on I didn't edited lines concerning my grepper config.

Here is my config file in case it can help (located at ~/.config/nvim/init.vim) :

if (has("nvim"))
  "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
  let $NVIM_TUI_ENABLE_TRUE_COLOR=1
 endif
"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
if (has("termguicolors"))
  set termguicolors
endif
call plug#begin('~/.config/nvim/plugged')
" If installed using git
Plug '~/.fzf'
Plug 'junegunn/fzf.vim'
Plug 'pbogut/fzf-mru.vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'bling/vim-bufferline'
Plug 'airblade/vim-gitgutter'
Plug 'severin-lemaignan/vim-minimap'
Plug 'joshdick/onedark.vim'
Plug 'miyakogi/seiya.vim'
Plug 'Yggdroot/indentLine'
Plug 'jlanzarotta/bufexplorer'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'sheerun/vim-polyglot'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-haml'
Plug 'tpope/vim-vinegar'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-rhubarb'
Plug 'tpope/vim-commentary'
Plug 'AndrewRadev/splitjoin.vim'
Plug 'ecomba/vim-ruby-refactoring'
" Plug 'w0rp/ale'
Plug 'mhinz/vim-grepper'
Plug 'mileszs/ack.vim'
Plug 'drewtempelmeyer/palenight.vim'
Plug 'nono/jquery.vim'
Plug 'wesQ3/vim-windowswap'
Plug 'chrisbra/Recover.vim'
" Plugins will go here in the middle.
call plug#end()
syntax on
set background=dark
"let g:onedark_color_overrides = {"yellow": {"gui": "#FFFF00", "cterm": "0", "cterm16": "0"}}
"colorscheme onedark
colorscheme palenight 

let g:ruby_path = system('echo $HOME/.rbenv/shims')
"let g:onedark_termcolors=256
let g:seiya_auto_enable=1
let g:seiya_target_groups = has('nvim') ? ['guibg'] : ['ctermbg']
let g:indentLine_char='?'
let g:indentLine_color_gui = '#333333'
"let g:indent_guides_enable_on_vim_startup = 1
"let g:indent_guides_auto_colors = 0
"let g:indent_guides_guide_size = 1
"autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd  guibg=black   ctermbg=3
"autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=darkgrey ctermbg=4
filetype on           " Enable filetype detection
filetype indent on    " Enable filetype-specific indenting
filetype plugin on    " Enable filetype-specific plugins

nnoremap <C-p> :FZF<CR>
let g:airline_theme='badwolf'
set number
set cursorline
set tabstop=2 expandtab shiftwidth=2 
set list listchars=tab:?·,trail:·,nbsp:·
"hi cursorline cterm=none term=none
"autocmd WinEnter * setlocal cursorline
"autocmd WinLeave * setlocal nocursorline
"highlight CursorLine guibg=#6699CC ctermbg=234

highlight Cursor guifg=white guibg=black
highlight nCursor guifg=black guibg=#aeee00
highlight iCursor guifg=black guibg=#4bd5ff
highlight vCursor guifg=black guibg=#ffa724
"highlight visual guifg=#141413 guibg=#0a9dff
"highlight visual guifg=white guibg=#0a9dff
highlight visual guifg=white guibg=#4bd5ff
set guicursor=n-v-c:block-Cursor
set guicursor+=i:ver70-iCursor 
set guicursor+=n-c:nCursor 
set guicursor+=v:vCursor 
nnoremap <silent> <esc> :noh<cr><esc>
let mapleader = ";"
nnoremap <Leader>b :BufExplorerHorizontalSplit<CR>:b<Space>
" au FocusLost * silent! wa
highlight minimapHighLight guifg=white guibg=black
let g:minimap_highlight='minimapHighLight'
let g:deoplete#enable_at_startup = 1

" deoplete tab-complete
inoremap <expr><tab> pumvisible() ? "<c-n>" : "<tab>"
inoremap <expr> <S-Tab> pumvisible() ? "<C-p>" : "<S-Tab>"
let g:UltiSnipsExpandTrigger="<c-b>"
"let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
nnoremap > v>
nnoremap < v<
vnoremap > >gv
tnoremap <Esc> <C-><C-n>
vnoremap < <gv
" More natural line movements
nmap j gj
nmap k gk
nmap <Space> /
nmap <C-Space> ?
nmap <C-d> <C-d>zz
nmap <C-u> <C-u>zz

" Easily move between 
" <CR>: close popup and save indent.
"inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
"function! s:my_cr_function() abort
"  return deoplete#close_popup() . "<CR>"
"endfunction
noremap <Leader>w :w<CR>
noremap <Leader>sp :sp<CR>
noremap <Leader>vsp :vsp<CR>
noremap <Leader>q :q<CR>
noremap <Leader>te :te<CR>
noremap <Leader>gb :Gblame<CR>
noremap <Leader>gw :Gwrite<CR>
" Go to next conflict
noremap <Leader>nc /HEAD<CR>zz
"let g:onedark_terminal_italics = 1
let g:airline#extensions#ale#enabled = 1
"tnoremap <Esc> <C-><C-n>

" Easier navigation between windows + move out of terminal before switching
" window
" nnoremap <C-k> <C-w>k
" nnoremap <C-j> <C-w>j
" nnoremap <C-h> <C-w>h
" nnoremap <C-l> <C-w>l

" Easier navigation between windows + move out of terminal before switching
" window
tnoremap <C-k> <C-><C-n><C-w>k
tnoremap <C-j> <C-><C-n><C-w>j
tnoremap <C-h> <C-><C-n><C-w>h
tnoremap <C-l> <C-><C-n><C-w>l

nnoremap <C-k> <C-><C-n><C-w>k
nnoremap <C-j> <C-><C-n><C-w>j
nnoremap <C-h> <C-><C-n><C-w>h
nnoremap <C-l> <C-><C-n><C-w>l

"More intuitive copy/paste
nnoremap <C-c> "+y
vnoremap <C-c> "+y
nnoremap <C-v> "+p
vnoremap <C-v> "+p
:set inccommand=nosplit
let g:airline#extensions#branch#enabled = 1
let g:NERDSpaceDelims = 1
if executable('ag')
  let g:ackprg = 'ag --vimgrep'
endif
" nmap < [
" nmap > ]
" omap < [
" omap > ]
" xmap < [
" xmap > ]
      "  'hl+':     ['fg', 'Statement'],
let g:fzf_action = {
 'ctrl-t': 'tab split',
 'ctrl-x': 'split',
 'ctrl-v': 'vsplit' }
 let g:fzf_layout = { 'down': '~20%' }    
 let g:fzf_colors =
     { 'fg':      ['fg', 'Normal'],
       'bg':      ['bg', 'Normal'],
       'hl':      ['fg', 'Comment'],
       'hl+':     ['fg', 'Exception'],
       'fg+':     ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
       'bg+':     ['bg', 'CursorLine', 'CursorColumn'],
       'header':  ['fg', 'Comment'],
       'marker':  ['fg', 'Keyword'],
       'info':    ['fg', 'PreProc'],
       'border':  ['fg', 'Ignore'],
       'pointer': ['fg', 'Exception'],
       'spinner': ['fg', 'Label'],
       'prompt':  ['fg', 'Conditional']}
autocmd! FileType fzf
autocmd  FileType fzf set laststatus=0 noshowmode noruler
  | autocmd BufLeave <buffer> set laststatus=2 showmode ruler
nmap H :FZFMru<CR>
" let g:palenight_terminal_italics=1

syn match pry_hi /.*binding.pry.*/
hi pry_hi guifg=white guibg=red
" hi Comment ctermfg=145 ctermbg=235 guifg=#697098 guibg=None
hi Comment ctermfg=145 ctermbg=235 guifg=#8790c6 guibg=None
let g:RecoverPlugin_Delete_Unmodified_Swapfile = 1
" vim-grepper config
nnoremap <leader>g :Grepper -query
let g:grepper = { 'next_tool': '<leader>g' }
nmap gs  <plug>(GrepperOperator)
xmap gs  <plug>(GrepperOperator)

" Allow netrw to remove non-empty local directories
"
let g:netrw_localrmdir='rm -r'

" Automatically enter insert mode when moving in terminal
autocmd BufWinEnter,WinEnter term://* startinsert

Thanks in advance for the help !

question from:https://stackoverflow.com/questions/65890381/neovim-vim-grepper-shows-no-result

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...