nvim: add termdebug setup

This commit is contained in:
dogeystamp 2022-07-01 18:18:55 -04:00
parent e5c5e2899d
commit 880cfa6843
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

@ -9,8 +9,12 @@ autocmd InsertLeave * hi StatusLine cterm=italic
highlight LineNr ctermfg=grey
highlight EndOfBuffer ctermfg=black ctermbg=black
" Disable highlighting when searching
nnoremap <esc> :noh<return><esc>
" NetRW
set splitbelow splitright
let g:netrw_banner = 0
@ -21,20 +25,39 @@ let g:netrw_winsize = 20
function! OpenNetRW()
Vexplore
wincmd l
endfunction
aug ProjectDrawer
au!
au VimEnter * :call OpenNetRW()
aug END
aug netrw_close
au!
au WinEnter * if winnr('$') == 1 && getbufvar(winbufnr(winnr()), "&filetype") == "netrw"|q|endif
aug END
nnoremap <tab> :wincmd w<cr>
inoremap <tab> <c-o>:wincmd w<cr>
nnoremap <s-tab> :wincmd W<cr>
inoremap <s-tab> <c-o>:wincmd W<cr>
nnoremap - :call OpenNetRW()<cr>
" gdb integration
let g:termdebug_popup = 0
let g:termdebug_wide = 100
tnoremap <tab> <c-\><c-n> :wincmd w<cr>
tnoremap <s-tab> <c-\><c-n> :wincmd W<cr>
tnoremap <esc> <c-\><c-n>
au BufEnter term://* startinsert
au BufEnter *.c,*.cpp,*.h,*.hpp packadd termdebug
nnoremap <f3> :Termdebug a.out<cr>
nnoremap <f4> :!g++ -g %:p<cr>
nnoremap <f5> :Run<cr>
nnoremap <s-f5> :Stop<cr>
nnoremap <f9> :Break<cr>
nnoremap <f8> :Clear<cr>
nnoremap <s-f10> :Continue<cr>
nnoremap <c-n> :Over<cr>
nnoremap <c-p> :Step<cr>
nnoremap <s-f11> :Finish<cr>