mirror of
https://github.com/amix/vimrc
synced 2025-07-09 10:45:00 +08:00
fix: escape spaces in expanded paths (#676)
This commit is contained in:
@ -241,7 +241,7 @@ au TabLeave * let g:lasttab = tabpagenr()
|
||||
|
||||
" Opens a new tab with the current buffer's path
|
||||
" Super useful when editing files in the same directory
|
||||
map <leader>te :tabedit <C-r>=expand("%:p:h")<cr>/
|
||||
map <leader>te :tabedit <C-r>=escape(expand("%:p:h"), " ")<cr>/
|
||||
|
||||
" Switch CWD to the directory of the open buffer
|
||||
map <leader>cd :cd %:p:h<cr>:pwd<cr>
|
||||
|
Reference in New Issue
Block a user