From 456232000cc2a5f20b5eb87f268ffea2e3667ac6 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 19 Sep 2021 15:27:34 +0530 Subject: cool new search mapping --- plugin/maps.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugin') diff --git a/plugin/maps.vim b/plugin/maps.vim index e471542..d252948 100644 --- a/plugin/maps.vim +++ b/plugin/maps.vim @@ -29,6 +29,16 @@ cmap w!! %!sudo -S tee > /dev/null % " visual vnoremap > >gv vnoremap < * : + \let old_reg=getreg('"')let old_regtype=getregtype('"') + \gvy/=&ic?'\c':'\C'=substitute( + \escape(@", '/\.*$^~['), '\_s\+', '\\_s\\+', 'g') + \gVzv:call setreg('"', old_reg, old_regtype) +vnoremap # : + \let old_reg=getreg('"')let old_regtype=getregtype('"') + \gvy?=&ic?'\c':'\C'=substitute( + \escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g') + \gVzv:call setreg('"', old_reg, old_regtype) " operator-pending onoremap ax a` -- cgit v1.2.3