mirror of
https://github.com/amix/vimrc
synced 2025-06-17 02:15:01 +08:00
Merge branch 'master' of github.com:amix/vimrc
This commit is contained in:
@ -231,17 +231,17 @@ map <leader>tn :tabnew<cr>
|
||||
map <leader>to :tabonly<cr>
|
||||
map <leader>tc :tabclose<cr>
|
||||
map <leader>tm :tabmove
|
||||
map <leader>t<leader> :tabnext
|
||||
map <leader>t<leader> :tabnext<cr>
|
||||
|
||||
" Let 'tl' toggle between this and the last accessed tab
|
||||
let g:lasttab = 1
|
||||
nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
|
||||
nmap <leader>tl :exe "tabn ".g:lasttab<CR>
|
||||
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>
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Important:
|
||||
" This requries that you install https://github.com/amix/vimrc !
|
||||
" This requires that you install https://github.com/amix/vimrc !
|
||||
"
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
@ -170,7 +170,7 @@ func! DeleteTillSlash()
|
||||
endfunc
|
||||
|
||||
func! CurrentFileDir(cmd)
|
||||
return a:cmd . " " . expand("%:p:h") . "/"
|
||||
return a:cmd . " " . escape(expand("%:p:h"), " ") . "/"
|
||||
endfunc
|
||||
|
||||
"=================================================================================
|
||||
|
Reference in New Issue
Block a user