summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2023-01-18 21:50:32 +0000
committerJosh Rahm <rahm@google.com>2023-01-18 21:50:32 +0000
commit55938916aa62e4f5088f28673f77ea1b6672a638 (patch)
tree40ad0ddd7ae71223063bd5519a1aa6f0ead5b976
parent9455878c49e42bac0403ef1e5bc20a48260ce1f4 (diff)
downloadconfig.vim-55938916aa62e4f5088f28673f77ea1b6672a638.tar.gz
config.vim-55938916aa62e4f5088f28673f77ea1b6672a638.tar.bz2
config.vim-55938916aa62e4f5088f28673f77ea1b6672a638.zip
Add TERM command
-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" }