nvim: make inkscape shortcut manager start when editing figure

This commit is contained in:
dogeystamp 2023-04-22 17:49:26 -04:00
parent 5808279548
commit 5344e2998d
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 22 additions and 0 deletions

View File

@ -120,9 +120,22 @@ nnoremap <silent> ZF :qa<cr>
function EditFig()
let figure_fname = expand('<cfile>')
exec "silent !typst-figure " .. figure_fname
vsp
exec "term inkscape-shortcut-manager"
quit
endfunc
:nnoremap <silent><leader>ff :call EditFig()<cr>
" compile typst doc on write
function TypstWatch()
vsp
vertical resize 50
exec 'terminal ' .. 'typst watch ' .. expand("%:t")
exec "norm \<c-w>h"
endfunc
:nnoremap <silent><leader>fc :call TypstWatch()<cr>
" Plugins
" Run PlugInstall if there are missing plugins

View File

@ -0,0 +1,9 @@
#!/bin/sh
# wrapper to have a single instance of inkscape-shortcut-manager running
if ! pgrep -f inkscape-shortcut-manager/main.py; then
# really hacky hardcoding of path here
# https://github.com/dogeystamp/inkscape-shortcut-manager
# clone this and point to its main.py
python3 ~/dox/proj/inkscape-shortcut-manager/main.py
fi