diff --git a/src/.config/nvim/init.vim b/src/.config/nvim/init.vim index b215479..e58c434 100755 --- a/src/.config/nvim/init.vim +++ b/src/.config/nvim/init.vim @@ -1,6 +1,7 @@ set tabstop=4 shiftwidth=4 noexpandtab relativenumber ai nu rnu nosmd ignorecase smartcase set showtabline=0 set lazyredraw nocursorline ttyfast +set clipboard=unnamedplus let mapleader = "," @@ -55,7 +56,14 @@ tnoremap " start debugger nnoremap dd :execute "Termdebug" $HOME .. "/.cache/termdebug/" .. expand("%:r"):Source " compile -nnoremap dc :Source:w:execute "make ~/.cache/termdebug/" .. expand("%:r") .. " -f ~/.config/nvim/makefile" +function Compile() + if exists(":Source") + Source + endif + execute "make ~/.cache/termdebug/" .. expand("%:r") .. " -f ~/.config/nvim/makefile" +endfunction + +nnoremap dc :call Compile() " start, stop, continue forwards nnoremap rs :Run nnoremap rr :Stop