diff options
Diffstat (limited to 'vim/init/keymaps.vim')
-rw-r--r-- | vim/init/keymaps.vim | 12 |
1 files changed, 6 insertions, 6 deletions
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 <leader>, :terminal<CR> | |||
78 | map <leader>pp :setlocal paste!<cr> | 78 | map <leader>pp :setlocal paste!<cr> |
79 | 79 | ||
80 | " Switch CDW to root git directory | 80 | " Switch CDW to root git directory |
81 | nnoremap <Leader>cdg :execute 'cd' fnameescape(fnamemodify(finddir('.git', escape(expand('%:p:h'), ' ') . ';'), ':h'))<CR>:pwd<CR> | 81 | nnoremap <Leader>cg :execute 'cd' fnameescape(fnamemodify(finddir('.git', escape(expand('%:p:h'), ' ') . ';'), ':h'))<CR>:pwd<CR> |
82 | " Switch CWD to the directory of the open buffer | 82 | " Switch CWD to the directory of the open buffer |
83 | map <leader>cd :cd %:p:h<cr>:pwd<cr> | 83 | map <leader>cd :cd %:p:h<cr>:pwd<cr> |
84 | 84 | ||
@@ -450,17 +450,17 @@ endfunc | |||
450 | " 下面进行 grep,这样能方便的对相关项目进行搜索 | 450 | " 下面进行 grep,这样能方便的对相关项目进行搜索 |
451 | "---------------------------------------------------------------------- | 451 | "---------------------------------------------------------------------- |
452 | if executable('rg') | 452 | if executable('rg') |
453 | noremap <silent><F2> :AsyncRun! -cwd=<root> rg -n --no-heading | 453 | noremap <silent><F2> :AsyncRun! -cwd=<root> rg -n --no-heading |
454 | \ --color never -g *.h -g *.c* -g *.py -g *.js -g *.vim | 454 | \ --color never -g *.h -g *.c* -g *.py -g *.js -g *.vim |
455 | \ <C-R><C-W> "<root>" <cr> | 455 | \ <C-R><C-W> "<root>" <cr> |
456 | elseif has('win32') || has('win64') | 456 | elseif has('win32') || has('win64') |
457 | noremap <silent><F2> :AsyncRun! -cwd=<root> findstr /n /s /C:"<C-R><C-W>" | 457 | noremap <silent><F2> :AsyncRun! -cwd=<root> findstr /n /s /C:"<C-R><C-W>" |
458 | \ "\%CD\%\*.h" "\%CD\%\*.c*" "\%CD\%\*.py" "\%CD\%\*.js" | 458 | \ "\%CD\%\*.h" "\%CD\%\*.c*" "\%CD\%\*.py" "\%CD\%\*.js" |
459 | \ "\%CD\%\*.vim" | 459 | \ "\%CD\%\*.vim" |
460 | \ <cr> | 460 | \ <cr> |
461 | else | 461 | else |
462 | noremap <silent><F2> :AsyncRun! -cwd=<root> grep -n -s -R <C-R><C-W> | 462 | noremap <silent><F2> :AsyncRun! -cwd=<root> grep -n -s -R <C-R><C-W> |
463 | \ --include='*.h' --include='*.c*' --include='*.py' | 463 | \ --include='*.h' --include='*.c*' --include='*.py' |
464 | \ --include='*.js' --include='*.vim' | 464 | \ --include='*.js' --include='*.vim' |
465 | \ '<root>' <cr> | 465 | \ '<root>' <cr> |
466 | endif | 466 | endif |