Add more vim telescope mappings

This commit is contained in:
Talia 2023-05-31 17:08:48 +02:00
parent 0149d79c70
commit 0eeaca7588

View file

@ -503,9 +503,11 @@ nnoremap ! :!
" --- Telescope --- " --- Telescope ---
nnoremap <leader>f :Telescope find_files<CR> nnoremap <leader>f :Telescope find_files<CR>
nnoremap <leader>b :Telescope buffers<CR>
nnoremap <leader>ld :Telescope lsp_definitions<CR> nnoremap <leader>ld :Telescope lsp_definitions<CR>
nnoremap <leader>lr :Telescope lsp_references<CR> nnoremap <leader>lr :Telescope lsp_references<CR>
nnoremap <leader>ll :Telescope lsp_ nnoremap <leader>ll :Telescope lsp_
nnoremap <leader>C :Telescope colorscheme<CR>
" --- F5 --- " --- F5 ---
nnoremap <F5> :nnoremap <buffer> <F5> :<lt>CR><left><left><left><left> nnoremap <F5> :nnoremap <buffer> <F5> :<lt>CR><left><left><left><left>
@ -633,23 +635,23 @@ digraph ss 223
command! HLProgress syntax match Comment /\_.*\ze\n.*\%#/ command! HLProgress syntax match Comment /\_.*\ze\n.*\%#/
vnoremap <leader>g :<C-u>call <SID>GrepOperator(visualmode())<CR> " vnoremap <leader>g :<C-u>call <SID>GrepOperator(visualmode())<CR>
nnoremap <leader>g :set operatorfunc=<SID>GrepOperator<CR>g@ " nnoremap <leader>g :set operatorfunc=<SID>GrepOperator<CR>g@
function! s:GrepOperator(type) " function! s:GrepOperator(type)
let reg1 = @@ " let reg1 = @@
if a:type==# 'v' " if a:type==# 'v'
execute "normal! `<v`>y" " execute "normal! `<v`>y"
elseif a:type==# 'char' " elseif a:type==# 'char'
execute "normal! `[y`]" " execute "normal! `[y`]"
else " else
return " return
end " end
echom "vimgrep! /\\M".escape(@@, "\\")."/ *" " echom "vimgrep! /\\M".escape(@@, "\\")."/ *"
silent! execute "vimgrep /\\M".escape(@@, "\\")."/j *" " silent! execute "vimgrep /\\M".escape(@@, "\\")."/j *"
let @@ = reg1 " let @@ = reg1
copen " copen
set nowrap " set nowrap
endfunction " endfunction
" Window Height stuff " Window Height stuff
command! EqualH call Equal() command! EqualH call Equal()