N
Size: a a a
VL
VL
SS
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>
N
VL
VL
SS
function GetVisualSelection()
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)]
return line
endfunction
vnoremap <silent> <leader>l :<C-U>Rg <C-R>=GetVisualSelection()<CR><CR>
VL
function GetVisualSelection()
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)]
return line
endfunction
vnoremap <silent> <leader>l :<C-U>Rg <C-R>=GetVisualSelection()<CR><CR>
SS
VL
SS
:Rg kek
тоже текст не вставляетVL
VL
VL
VL
G
V
VL