Compare commits

..

6 Commits

Author SHA1 Message Date
676a19c14b
nvim: added em-dash digraph 2023-05-20 18:29:03 -04:00
1ec00a1d42
nvim: add vimspector conditional breakpoint and better eval bind 2023-05-20 18:28:24 -04:00
5a54e35b77
nvim: add eval bind for vimspector 2023-05-20 17:52:47 -04:00
ed91e5bcd6
nvim: use codelldb instead of vscode cpp for debugging
vscode's cpp extension has proprietary bits
2023-05-20 17:26:26 -04:00
e6747a4bd2
qutebrowser: fixlink.sh - added Fandom wiki alternative 2023-05-20 16:34:55 -04:00
a13717fe60
nvim: misc fixes
vimspector now properly works
2023-05-20 16:27:20 -04:00
5 changed files with 41 additions and 16 deletions

View File

@ -23,4 +23,5 @@ call digraph_setlist([
call digraph_setlist([
\["++", '✝'],
\["+-", '†'],
\["m-", '—'],
\])

View File

@ -44,8 +44,6 @@ nnoremap <silent> <esc> :noh<return><esc>
" shortcuts to type symbols easier
source $XDG_CONFIG_HOME/nvim/digraphs.vim
vnoremap <silent> K :'<,'>Evaluate<cr>
" tab, window management
set splitbelow splitright
nnoremap <C-j> <C-w>w

View File

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

View File

@ -15,7 +15,7 @@ function Compile()
call win_gotoid(g:vimspector_session_windows.code)
endif
w
execute "make ~/.cache/termdebug/" .. expand("%:r") .. " -f ~/.config/nvim/makefile"
execute "make ~/.cache/termdebug/bin/" .. expand("%:r") .. " -f ~/.config/nvim/makefile"
endfunction
nnoremap <silent> <leader>dc :call Compile()<cr>
@ -23,8 +23,8 @@ nnoremap <silent> <leader>dc :call Compile()<cr>
nnoremap <silent> <leader>dqf :tab cope<cr>
nnoremap <silent> <leader>df :tabNext<cr>
nnoremap <silent> <leader>dd :call vimspector#Launch()
nnoremap <silent> <leader>de :call vimspector#Reset()
nnoremap <silent> <leader>dd :call vimspector#Launch()<cr>
nnoremap <silent> <leader>de :call vimspector#Reset()<cr>
" write clipboard into input file
function WriteInput()
@ -34,15 +34,15 @@ function WriteInput()
endfunction
nnoremap <silent> <leader>rw :call WriteInput()<cr>
" start from input file
" feed from input file into program stdin
function RunInput()
call vimspector#Stop()
call vimspector#Restart()
let l:winid = win_getid()
call win_gotoid(g:vimspector_session_windows.code)
let inputfile=$HOME .. "/.cache/termdebug/input/" .. expand("%:r")
let @x = join(readfile(inputfile), "\n") .. "\n\n"
let l:inputfile=$HOME .. "/.cache/termdebug/input/" .. expand("%:r")
let @x = join(readfile(l:inputfile), "\n") .. "\n\n"
call win_gotoid(g:vimspector_session_windows.terminal)
normal G"xp
call win_gotoid(l:winid)
endfunction
nnoremap <silent> <leader>ri :call RunInput()<cr>
@ -50,8 +50,31 @@ nnoremap <silent> <leader>ri :call RunInput()<cr>
nnoremap <silent> <leader>rs :call vimspector#Restart()<cr>
nnoremap <silent> <leader>rr :call vimspector#Stop()<cr>
nnoremap <silent> <leader>rf :call vimspector#Continue()<cr>
nnoremap <silent> <c-p> :vimspector#StepInto()<cr>
nnoremap <silent> <c-n> :vimspector#StepOver()<cr>
" codelldb breaks if you just restart directly
func VimspectorHardRestart()
call vimspector#Stop()
sleep 100m
call vimspector#Restart()
endfunc
nnoremap <silent> <leader>rt :call VimspectorHardRestart()<cr>
nnoremap <silent> <c-p> :call vimspector#StepInto()<cr>
nnoremap <silent> <c-n> :call vimspector#StepOver()<cr>
" breakpoints
nnoremap <silent> <leader>dsf :call vimspector#ToggleBreakpoint()<cr>
nnoremap <silent> <leader>dsF <Plug>VimspectorToggleConditionalBreakpoint
nnoremap <silent> <leader>dsc :call vimspector#ClearBreakpoints()<cr>
" watches
au BufEnter vimspector.Watches* nnoremap <silent> <buffer> dd :call vimspector#DeleteWatch()<cr>
func VimspectorEval()
let l:winid = win_getid()
normal gv"xy
call win_gotoid(g:vimspector_session_windows.output)
execute "normal! ip " . @x . "\n\<Esc>"
call win_gotoid(l:winid)
endfunc
vnoremap <silent> K :call VimspectorEval()<cr>
nnoremap <silent> K <Plug>VimspectorBalloonEval

View File

@ -11,12 +11,15 @@ REDDIT="lr.mint.lgbt"
TWITTER="nitter.net"
# genius lyrics
GENIUS="sing.whatever.social"
# fandom the wiki
FANDOM="breezewiki.com"
YOUTUBE="yewtu.be"
LINK="$(printf "%s" "$QUTE_URL" | sed \
-e "s/www.reddit.com/$REDDIT/g" \
-e "s/twitter.com/$TWITTER/g" \
-e "s/genius.com/$GENIUS/g" \
-e "s/fandom.com/$FANDOM/g" \
-e "s/youtube.com/$YOUTUBE/g")"
echo "open $1 $LINK" >> "$QUTE_FIFO"