N
Size: a a a
VL
VL
VL
VL
G
V
VL
VL
VL
SS
function GrepVisualSelection()
let [line1, col1] = getpos("'<")[1:2]
let [line2, col2] = getpos("'>")[1:2]
let line = getline(line1)
let line = line[col1 - 1 : col2 - (&selection == 'inclusive' ? 1 : 2)]
call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case -- ".shellescape(line), fzf#vim#with_preview(), 0)
endfunction
vnoremap <leader>q :call GrepVisualSelection()<CR>
VL
function GrepVisualSelection()
let [line1, col1] = getpos("'<")[1:2]
let [line2, col2] = getpos("'>")[1:2]
let line = getline(line1)
let line = line[col1 - 1 : col2 - (&selection == 'inclusive' ? 1 : 2)]
call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case -- ".shellescape(line), fzf#vim#with_preview(), 0)
endfunction
vnoremap <leader>q :call GrepVisualSelection()<CR>
G
VL
VL
function GrepVisualSelection()
let [line1, col1] = getpos("'<")[1:2]
let [line2, col2] = getpos("'>")[1:2]
let line = getline(line1)
let line = line[col1 - 1 : col2 - (&selection == 'inclusive' ? 1 : 2)]
call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case -- ".shellescape(line), fzf#vim#with_preview(), 0)
endfunction
vnoremap <leader>q :call GrepVisualSelection()<CR>
SS
SS