1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 22:55:10 +01:00

Search in files tryouts

This commit is contained in:
2018-04-30 13:59:30 +02:00
parent 0bc76da0c2
commit 0640a92e6a

13
.vimrc
View File

@@ -103,6 +103,9 @@ if executable('ag')
"let g:ackprg = 'ag --nogroup --nocolor --column'
let g:ackprg = 'ag --vimgrep'
endif
if executable('rg')
let g:ackprg = 'rg --vimgrep'
endif
" fzf integration for fast fuzzy finding, better and faster than ctrl-p
set rtp+=~/workspace/projects/others/fzf
@@ -113,6 +116,16 @@ Plugin 'junegunn/fzf.vim'
" searched
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0)
" Handy search stuff
" https://github.com/BurntSushi/ripgrep/issues/425
set grepprg=rg\ --vimgrep\ --no-heading\ --smart-case
"nnoremap <Leader>g :silent lgrep<Space>
nnoremap <silent> [f :lprevious<CR>
nnoremap <silent> ]f :lnext<CR>
" F8 search for word under the cursor recursively , :copen , to close -> :ccl
nnoremap <F8> :grep! "\<<cword>\>" . -r<CR>:copen 33<CR>
" Simply type ; to search through buffers, leader-o to search through file
" names, \t for tags, \c for (Git) commits and \f to search through contents
" of files