Compare commits
6 Commits
aad07e6abb
...
676a19c14b
Author | SHA1 | Date | |
---|---|---|---|
676a19c14b | |||
1ec00a1d42 | |||
5a54e35b77 | |||
ed91e5bcd6 | |||
e6747a4bd2 | |||
a13717fe60 |
@ -23,4 +23,5 @@ call digraph_setlist([
|
||||
call digraph_setlist([
|
||||
\["++", '✝'],
|
||||
\["+-", '†'],
|
||||
\["m-", '—'],
|
||||
\])
|
||||
|
@ -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
|
||||
|
@ -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 $@
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user