mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-31 07:09:54 +02:00
style: removed a complex keymap to search visual selection. not ideal for new users
This commit is contained in:
parent
478f75cb76
commit
9b120aec36
1 changed files with 1 additions and 13 deletions
|
@ -52,19 +52,7 @@ vim.keymap.set("n", "<C-s>", "<cmd>:w<cr><esc>")
|
|||
vim.keymap.set("v", "<", "<gv")
|
||||
vim.keymap.set("v", ">", ">gv")
|
||||
|
||||
-- makes * and # work on visual mode too.
|
||||
vim.cmd([[
|
||||
function! g:VSetSearch(cmdtype)
|
||||
let temp = @s
|
||||
norm! gv"sy
|
||||
let @/ = '\V' . substitute(escape(@s, a:cmdtype.'\'), '\n', '\\n', 'g')
|
||||
let @s = temp
|
||||
endfunction
|
||||
|
||||
xnoremap * :<C-u>call g:VSetSearch('/')<CR>/<C-R>=@/<CR><CR>
|
||||
xnoremap # :<C-u>call g:VSetSearch('?')<CR>?<C-R>=@/<CR><CR>
|
||||
]])
|
||||
|
||||
-- lazygit
|
||||
vim.keymap.set("n", "<leader>gg", function()
|
||||
require("lazy.util").open_cmd({ "lazygit" }, {
|
||||
terminal = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue