diff options
-rw-r--r-- | init.vim | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -144,7 +144,7 @@ if isdirectory(printf('%s/.config/nvim/after', $HOME)) endif noremap <leader>nt <cmd>NvimTreeToggle<cr> -noremap <C-n><C-e> :<C-u>e <C-r>=expand('%:h')<cr>/ +noremap <C-n><C-e> :<C-u>e <C-r>=escape(expand('%:h'), ' \')<cr>/ noremap <C-w>. <cmd>lua require('windownav').goto_terminal()<cr> noremap <C-w>I <cmd>lua require('windownav').goto_initvim()<cr> noremap <C-w>' <cmd>lua require('windownav').goto_lastwin()<cr> @@ -167,7 +167,7 @@ if has('rneovim') endif " Opens a terminal in the directory of the current file. -command! TERM exec "term sh -c 'cd " . expand('%:p:h') . " && exec $SHELL'" +command! TERM exec "term sh -c " . shellescape(printf("cd %s && exec ", shellescape(expand('%:p:h')))) . '$SHELL' " W = w. I often click when typing :w command! W w |