Last active
September 24, 2022 19:44
-
-
Save krobelus/b064c3cfae55b635908a59ac9255ace1 to your computer and use it in GitHub Desktop.
rudimentary synctex support for Kakoune
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define-command -override zathura-open %{ | |
nop %sh{ | |
pdf=${kak_buffile%.tex}.pdf | |
zathura \ | |
-x "sh -c 'echo evaluate-commands -verbatim -client ${kak_client} -- edit -- %{input} %{line} | kak -p ${kak_session}'" \ | |
"$pdf" </dev/null >/dev/null 2>&1 & | |
} | |
} | |
define-command -override zathura-jump %{ | |
nop %sh{ | |
pdf=${kak_buffile%.tex}.pdf | |
zathura --synctex-forward ${kak_cursor_line}:${kak_cursor_column}:${kak_buffile} "$pdf" \ | |
</dev/null >/dev/null 2>&1 & | |
} | |
} | |
map global user z ': zathura-open<ret>' | |
map global user <ret> ': zathura-jump<ret>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment