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:
13
.vimrc
13
.vimrc
@@ -103,6 +103,9 @@ if executable('ag')
|
|||||||
"let g:ackprg = 'ag --nogroup --nocolor --column'
|
"let g:ackprg = 'ag --nogroup --nocolor --column'
|
||||||
let g:ackprg = 'ag --vimgrep'
|
let g:ackprg = 'ag --vimgrep'
|
||||||
endif
|
endif
|
||||||
|
if executable('rg')
|
||||||
|
let g:ackprg = 'rg --vimgrep'
|
||||||
|
endif
|
||||||
|
|
||||||
" fzf integration for fast fuzzy finding, better and faster than ctrl-p
|
" fzf integration for fast fuzzy finding, better and faster than ctrl-p
|
||||||
set rtp+=~/workspace/projects/others/fzf
|
set rtp+=~/workspace/projects/others/fzf
|
||||||
@@ -113,6 +116,16 @@ Plugin 'junegunn/fzf.vim'
|
|||||||
" searched
|
" 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)
|
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
|
" 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
|
" names, \t for tags, \c for (Git) commits and \f to search through contents
|
||||||
" of files
|
" of files
|
||||||
|
|||||||
Reference in New Issue
Block a user