summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/init.vim b/init.vim
index 29e7163..e29162f 100644
--- a/init.vim
+++ b/init.vim
@@ -59,6 +59,7 @@ noremap Y y$
augroup InitVim
au!
autocmd BufRead *.java,*.c,*.cpp,*.cxx TSBufEnable highlight
+ autocmd TermOpen * startinsert
augroup END
noremap รบ <cmd>FormatCode<cr>
@@ -86,6 +87,9 @@ endif
map <leader>nt <cmd>NvimTreeToggle<cr>
noremap <leader>nE :<C-u>e <C-r>=expand('%:h')<cr>/
+" Opens a terminal in the directory of the current file.
+command! TERM exec "term sh -c 'cd " . expand('%:p:h') . " && exec $SHELL'"
+
lua << EOF
-- CiderLSP
vim.opt.completeopt = { "menu", "menuone", "noselect" }