From 345b7242678868f18d2b08d14799186353e68baa Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 25 Jun 2024 18:24:40 +0800 Subject: Update --- vim/init/keymaps.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'vim/init/keymaps.vim') diff --git a/vim/init/keymaps.vim b/vim/init/keymaps.vim index 211a0d1..14d813b 100644 --- a/vim/init/keymaps.vim +++ b/vim/init/keymaps.vim @@ -78,7 +78,7 @@ vnoremap , :terminal map pp :setlocal paste! " Switch CDW to root git directory -nnoremap cdg :execute 'cd' fnameescape(fnamemodify(finddir('.git', escape(expand('%:p:h'), ' ') . ';'), ':h')):pwd +nnoremap cg :execute 'cd' fnameescape(fnamemodify(finddir('.git', escape(expand('%:p:h'), ' ') . ';'), ':h')):pwd " Switch CWD to the directory of the open buffer map cd :cd %:p:h:pwd @@ -450,17 +450,17 @@ endfunc " 下面进行 grep,这样能方便的对相关项目进行搜索 "---------------------------------------------------------------------- if executable('rg') - noremap :AsyncRun! -cwd= rg -n --no-heading - \ --color never -g *.h -g *.c* -g *.py -g *.js -g *.vim + noremap :AsyncRun! -cwd= rg -n --no-heading + \ --color never -g *.h -g *.c* -g *.py -g *.js -g *.vim \ "" elseif has('win32') || has('win64') - noremap :AsyncRun! -cwd= findstr /n /s /C:"" + noremap :AsyncRun! -cwd= findstr /n /s /C:"" \ "\%CD\%\*.h" "\%CD\%\*.c*" "\%CD\%\*.py" "\%CD\%\*.js" \ "\%CD\%\*.vim" \ else - noremap :AsyncRun! -cwd= grep -n -s -R - \ --include='*.h' --include='*.c*' --include='*.py' + noremap :AsyncRun! -cwd= grep -n -s -R + \ --include='*.h' --include='*.c*' --include='*.py' \ --include='*.js' --include='*.vim' \ '' endif -- cgit v1.2.3-70-g09d2