Compare commits

..

No commits in common. "833c0d61683e97888ecb866e3122464e5e6eb904" and "1201922b9d55bc8392846b74838913287d8893b4" have entirely different histories.

3 changed files with 15 additions and 32 deletions

View File

@ -1,8 +1,7 @@
set tabstop=4 shiftwidth=4 noexpandtab relativenumber ai nu rnu nosmd ignorecase smartcase
set showtabline=0
set lazyredraw nocursorline ttyfast
let mapleader = ","
let maplocalleader = ","
set shell=/bin/sh
@ -43,44 +42,33 @@ nnoremap - :call OpenNetRW()<cr>
" gdb integration
let g:termdebug_popup = 0
let g:termdebug_wide = 50
let g:termdebug_wide = 100
" Enter insert mode automatically in terminal windows
"au BufEnter term://* startinsert
au BufEnter *.c,*.cpp,*.h,*.hpp packadd termdebug
au TermOpen * setlocal nonumber norelativenumber
tnoremap <silent> <esc> <c-\><c-n><c-\><c-n>
" start debugger
nnoremap <silent> <leader>dd :execute "Termdebug" $HOME .. "/.cache/termdebug/" .. expand("%:r")<cr>:Source<cr>
" compile
nnoremap <silent> <leader>dc :Source<cr>:w<cr>:execute "make ~/.cache/termdebug/" .. expand("%:r") .. " -f ~/.config/nvim/makefile"<cr>
" start, stop, continue forwards
nnoremap <silent> <leader>rs :Run<cr>
nnoremap <silent> <leader>rr :Stop<cr>
nnoremap <silent> <leader>rf :Continue<cr>
" clear, add breakpoints
nnoremap <silent> <leader>dsc :Clear<cr>
nnoremap <silent> <leader>dsf :Break<cr>
nnoremap <silent> <f3> :execute "Termdebug" $HOME .. "/.cache/termdebug.out"<cr>
nnoremap <silent> <f4> :!g++ -Wall -Wextra -Wpedantic -g %:p -o ~/.cache/termdebug.out<cr>
nnoremap <silent> <f5> :Run<cr>
nnoremap <silent> <f6> :Stop<cr>
nnoremap <silent> <f8> :Clear<cr>
nnoremap <silent> <f9> :Break<cr>
nnoremap <silent> <f10> :Continue<cr>
nnoremap <silent> <C-h> :vertical resize -5<cr>
nnoremap <silent> <C-l> :vertical resize +5<cr>
nnoremap <C-j> <C-w>w
nnoremap <C-k> <C-w>W
nnoremap <silent> <c-p> :Step<cr>
nnoremap <silent> <c-n> :Over<cr>
" quickfix window (after running make)
nnoremap <silent> <leader>dqf :tab cope<cr>
nnoremap <silent> <leader>df :tabNext<cr>
vnoremap <silent> K :'<,'>Evaluate<cr>
" tab, window management
nnoremap <C-j> <C-w>w
nnoremap <C-k> <C-w>W
" force exit (akin to ZZ, ZQ)
nnoremap <silent> ZF :qa!<cr>
" Plugins
" Run PlugInstall if there are missing plugins

View File

@ -1,5 +0,0 @@
# makefile for compiling individual files from vim
~/.cache/termdebug/%: %.cpp
mkdir -p ~/.cache/termdebug/
$(LINK.cpp) -g -Wall -Wpedantic $^ $(LOADLIBES) $(LDLIBS) -o $@

View File

@ -252,11 +252,11 @@ snippet bigo "O() asymptotic time complexity"
endsnippet
snippet logn "O(log n) time complexity" i
\log N
\log n
endsnippet
snippet nlogn "O(n log n) time complexity" i
N \log N
n \log n
endsnippet
snippet rec "tikz rectangle draw" bi