vim ags
vigation
_____ ____ ______
__ / ___/ ___/
/ __ _/ /_/ >___
(____ /___ /____ >
//_____/ /
다음에 초점을 맞춘 Silver Searcher 또는 ripgrep용 Vim 플러그인
명확한 디스플레이와 검색 결과의 쉬운 탐색
병원체, vundle, 플러그를 통해 설치하거나 Vim 디렉토리에 복사
ag 또는 rg 실행 파일도 설치해야 합니다.
문서를 참조하거나 검색 결과 창에서 u
(사용법)를 누르세요.
이름에도 불구하고 vim-ags
아래와 같이 구성된 경우 ripgrep
에서도 작동합니다.
let g: ags_agexe = ' rg '
let g: ags_agargs = {
' --column ' : [ ' ' , ' ' ],
' --line-number ' : [ ' ' , ' ' ],
' --context ' : [ ' g:ags_agcontext ' , ' -C ' ],
' --max-count ' : [ ' g:ags_agmaxcount ' , ' ' ],
' --heading ' : [ ' ' , ' ' ],
' --smart-case ' : [ ' ' , ' -S ' ],
' --color ' : [ ' always ' , ' ' ],
' --colors ' : [[ ' match:fg:green ' , ' match:bg:black ' , ' match:style:nobold ' , ' path:fg:red ' , ' path:style:bold ' , ' line:fg:black ' , ' line:style:bold ' ] , ' ' ],
}
" Search for the word under cursor
nnoremap <Leader> s :Ags <Space><C-R> =expand(' <cword> ') <CR><CR>
" Search for the visually selected text
vnoremap <Leader> s y:Ags <Space><C-R> ='"' . escape(@", '"*?()[]{}.') . '"' <CR><CR>
" Run Ags
nnoremap <Leader> a :Ags <Space>
" Quit Ags
nnoremap <Leader> <Leader> a :AgsQuit <CR>
Ag 버전 >= 0.29.1 또는 ripgrep >= 11.0.2에서 작동
다음은 검색 결과 창의 스크린샷입니다.
ctrlsf