Compare commits
No commits in common. "a756f7b22cb0975467f332cc40a21d9577f038fc" and "8b3a4d08ca2310d881a3456186549c47c17bb89d" have entirely different histories.
a756f7b22c
...
8b3a4d08ca
@ -1,7 +1,6 @@
|
|||||||
set tabstop=4 shiftwidth=4 noexpandtab relativenumber ai nu rnu nosmd ignorecase smartcase
|
set tabstop=4 shiftwidth=4 noexpandtab relativenumber ai nu rnu nosmd ignorecase smartcase
|
||||||
set showtabline=0
|
set showtabline=0
|
||||||
set lazyredraw nocursorline ttyfast
|
set lazyredraw nocursorline ttyfast
|
||||||
set clipboard=unnamedplus
|
|
||||||
|
|
||||||
let mapleader = ","
|
let mapleader = ","
|
||||||
|
|
||||||
@ -55,36 +54,8 @@ au TermOpen * setlocal nonumber norelativenumber
|
|||||||
tnoremap <silent> <esc> <c-\><c-n><c-\><c-n>
|
tnoremap <silent> <esc> <c-\><c-n><c-\><c-n>
|
||||||
" start debugger
|
" start debugger
|
||||||
nnoremap <silent> <leader>dd :execute "Termdebug" $HOME .. "/.cache/termdebug/" .. expand("%:r")<cr>:Source<cr>
|
nnoremap <silent> <leader>dd :execute "Termdebug" $HOME .. "/.cache/termdebug/" .. expand("%:r")<cr>:Source<cr>
|
||||||
|
|
||||||
" compile
|
" compile
|
||||||
function Compile()
|
nnoremap <silent> <leader>dc :Source<cr>:w<cr>:execute "make ~/.cache/termdebug/" .. expand("%:r") .. " -f ~/.config/nvim/makefile"<cr>
|
||||||
if exists(":Source")
|
|
||||||
Source
|
|
||||||
endif
|
|
||||||
execute "make ~/.cache/termdebug/" .. expand("%:r") .. " -f ~/.config/nvim/makefile"
|
|
||||||
endfunction
|
|
||||||
nnoremap <silent> <leader>dc :call Compile()<cr>
|
|
||||||
|
|
||||||
" write clipboard into input file
|
|
||||||
function WriteInput()
|
|
||||||
let inputfile=$HOME .. "/.cache/termdebug/input/" .. expand("%:r")
|
|
||||||
echo "Written input to '" .. inputfile .. "'."
|
|
||||||
call writefile(getreg('+', 1, 1), inputfile)
|
|
||||||
endfunction
|
|
||||||
nnoremap <silent> <leader>rw :call WriteInput()<cr>
|
|
||||||
|
|
||||||
" start from input file
|
|
||||||
function RunInput()
|
|
||||||
Stop
|
|
||||||
Run
|
|
||||||
Source
|
|
||||||
let inputfile=$HOME .. "/.cache/termdebug/input/" .. expand("%:r")
|
|
||||||
let @x = join(readfile(inputfile), "\n") .. "\n\n"
|
|
||||||
Program
|
|
||||||
normal G"xp
|
|
||||||
endfunction
|
|
||||||
nnoremap <silent> <leader>ri :call RunInput()<cr>
|
|
||||||
|
|
||||||
" start, stop, continue forwards
|
" start, stop, continue forwards
|
||||||
nnoremap <silent> <leader>rs :Run<cr>
|
nnoremap <silent> <leader>rs :Run<cr>
|
||||||
nnoremap <silent> <leader>rr :Stop<cr>
|
nnoremap <silent> <leader>rr :Stop<cr>
|
||||||
@ -107,8 +78,8 @@ vnoremap <silent> K :'<,'>Evaluate<cr>
|
|||||||
" tab, window management
|
" tab, window management
|
||||||
nnoremap <C-j> <C-w>w
|
nnoremap <C-j> <C-w>w
|
||||||
nnoremap <C-k> <C-w>W
|
nnoremap <C-k> <C-w>W
|
||||||
" exit all (akin to ZZ, ZQ)
|
" force exit (akin to ZZ, ZQ)
|
||||||
nnoremap <silent> ZF :qa<cr>
|
nnoremap <silent> ZF :qa!<cr>
|
||||||
|
|
||||||
" Plugins
|
" Plugins
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user