nvim: make inkscape shortcut manager start when editing figure
This commit is contained in:
parent
5808279548
commit
5344e2998d
@ -120,9 +120,22 @@ nnoremap <silent> ZF :qa<cr>
|
|||||||
function EditFig()
|
function EditFig()
|
||||||
let figure_fname = expand('<cfile>')
|
let figure_fname = expand('<cfile>')
|
||||||
exec "silent !typst-figure " .. figure_fname
|
exec "silent !typst-figure " .. figure_fname
|
||||||
|
vsp
|
||||||
|
exec "term inkscape-shortcut-manager"
|
||||||
|
quit
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
:nnoremap <silent><leader>ff :call EditFig()<cr>
|
: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
|
" Plugins
|
||||||
|
|
||||||
" Run PlugInstall if there are missing plugins
|
" Run PlugInstall if there are missing plugins
|
||||||
|
9
src/.local/bin/inkscape-shortcut-manager
Executable file
9
src/.local/bin/inkscape-shortcut-manager
Executable 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
|
Loading…
Reference in New Issue
Block a user