diff --git a/src/.config/fish/aliases.fish b/src/.config/fish/aliases.fish index 4e3a4c3..1fdd486 100644 --- a/src/.config/fish/aliases.fish +++ b/src/.config/fish/aliases.fish @@ -85,5 +85,6 @@ function prob_cpp; echo $EDITOR src/(basename (xsel -b)).cpp; end abbr -a cpp --function prob_cpp function prob_py; echo $EDITOR src/(basename (xsel -b)).py; end abbr -a py --function prob_py -function prob_pdf; echo zathura (basename (xsel -b)).pdf; end +# in .config/nvim/typst.vim there is a bind that copies the path +function prob_pdf; echo zathura (xsel -b); end abbr -a pdf --function prob_pdf diff --git a/src/.config/nvim/typst.vim b/src/.config/nvim/typst.vim index 2bf850b..19ceb59 100644 --- a/src/.config/nvim/typst.vim +++ b/src/.config/nvim/typst.vim @@ -23,10 +23,12 @@ nnoremap fs :call ScreenshotFig() " compile typst doc on write function TypstWatch() vsp - vertical resize 50 - exec 'terminal ' .. 'typst watch ' .. expand("%:t") + vertical resize 20 + exec 'terminal ' .. 'typst watch ' .. expand("%:") exec "norm \h" endfunc nnoremap fc :call TypstWatch() +nnoremap fr :call setreg("+", expand("%:p:r") . ".pdf"):echo "Copied path." + au Filetype typst let g:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '$':'$', "```" : "```", "`": "`"}