1
0
Fork 0
This commit is contained in:
Luca Bilke 2024-06-13 01:05:48 +02:00
parent 32fda3648e
commit 276920a5c3
No known key found for this signature in database
GPG Key ID: C9E851809C1A5BDE
2 changed files with 10 additions and 3 deletions

View File

@ -156,7 +156,7 @@ cmd find_word ${{
row="$(echo "$res" | cut -d':' -f2)"
column="$(echo "$res" | cut -d':' -f3)"
if [ -n "$res" ]; then
if { [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; } && [ -n "$EMBEDDED" ]; then
if [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ] && [ -n "$EMBEDDED" ]; then
lf -remote "send $id \$$EDITOR +'call cursor($row, $column)' -- $([ -n "$EMBEDDED" ] && echo "--") '$file'"
else
lf -remote "send $id \$$EDITOR '$file'"

View File

@ -23,7 +23,14 @@ video() {
}
text() {
bat --color=always --style=plain --pager=never --terminal-width "$((w - 2))" "$@" "$f"
bat \
--color=always \
--italic-text=always \
--style=plain \
--pager=never \
--tabs=4 \
--theme=base16 \
--terminal-width="$((w - 2))" "$@" "$f"
exit 1
}
@ -67,7 +74,7 @@ mimetest() {
*/*yaml)
# [ ! -f "${CACHE}.txt" ] && run yq -C <"$f" >"${CACHE}.txt"
# text "${CACHE}.txt"
text
text --language=yaml
;;
*/*lua) text ;;
*/epub+zip)