vim: Add terminal related settings

This commit is contained in:
2020-12-19 02:55:23 +01:00
parent a62cd25021
commit da732648f8

View File

@@ -175,6 +175,15 @@ noremap <Tab> <Tab>zz
noremap <C-O> <C-O>zz
nmap <S-Tab> <C-O>
" Terminal
if (has('nvim'))
" tnoremap <Esc> <C-\><C-n>
nmap <leader>t :split +terminal<CR>i
nmap <leader>vt :vsplit +terminal<CR>i
elseif (has('terminal'))
nmap <leader>t :terminal<CR>
endif
" Aesthetics ###################################################################
" Use 24-bit (true-color) mode
if (has('termguicolors'))
@@ -227,6 +236,12 @@ autocmd InsertLeave * match ExtraWhitespace /\s\+$/
" Clear all matches
autocmd BufWinLeave * call clearmatches()
" Terminal
if (has('nvim'))
" Disable spellcheck
autocmd TermOpen * setlocal nospell
endif
" change cursor shape depending on mode
if (has('nvim'))
" Beam when exiting