vim ags
vigation
_____ ____ ______
__ / ___/ ___/
/ __ _/ /_/ >___
(____ /___ /____ >
//_____/ /
ปลั๊กอิน Vim สำหรับผู้ค้นหาเงินหรือ ripgrep ที่เน้น
การแสดงผลที่ชัดเจนและการนำทางผลการค้นหาที่ง่ายดาย
ติดตั้งผ่านเชื้อโรค 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