AutoYADM commit: 2025-05-21 03:03:07
This commit is contained in:
parent
ec6e7d142a
commit
7c524d8e20
2 changed files with 116 additions and 111 deletions
|
@ -37,9 +37,14 @@ hook global WinSetOption filetype=man %{
|
|||
remove-highlighter window/show-whitespaces
|
||||
ui-wrap-disable
|
||||
}
|
||||
define-command mantest %{
|
||||
execute-keys %sh{
|
||||
result=$((kak_window_height / 2 - 1))
|
||||
notify-send 'this'
|
||||
printf '%d%s' "$result" 'j'
|
||||
}
|
||||
}
|
||||
hook window User manpageloaded %{
|
||||
mantest
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,8 @@ hook global WinSetOption filetype=man %{
|
|||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window man-hooks }
|
||||
}
|
||||
|
||||
define-command -hidden -params ..3 man-impl %{ evaluate-commands %sh{
|
||||
define-command -hidden -params ..3 man-impl %{
|
||||
evaluate-commands %sh{
|
||||
buffer_name="$1"
|
||||
if [ -z "${buffer_name}" ]; then
|
||||
exit
|
||||
|
@ -59,7 +60,9 @@ define-command -hidden -params ..3 man-impl %{ evaluate-commands %sh{
|
|||
nop %%sh{ rm "%s"; rm "%s" }
|
||||
' "$(cat "$manerr")" "${colout}" "${manerr}"
|
||||
fi
|
||||
} }
|
||||
}
|
||||
trigger-user-hook manpageloaded
|
||||
}
|
||||
|
||||
# MAN COMMAND
|
||||
# TODO: REMOVE number lines and show whitespace highlighters!
|
||||
|
@ -91,8 +94,6 @@ define-command -params ..1 \
|
|||
printf %s\\n "evaluate-commands -try-client %opt{docsclient} man-impl man $pagenum $subject"
|
||||
} }
|
||||
|
||||
|
||||
|
||||
# The following section of code enables a user
|
||||
# to go to next or previous man page links and to follow man page links,
|
||||
# for example, apropos(1), that would normally appear in SEE ALSO sections.
|
||||
|
@ -139,4 +140,3 @@ map global man 'g' -docstring 'Jump to a man page using selected man page link'
|
|||
map global man 'j' -docstring 'Go to next man page link' :man-link-next<ret>
|
||||
map global man 'k' -docstring 'Go to previous man page link' :man-link-prev<ret>
|
||||
map global man 'm' -docstring 'Look up a man page' :man<space>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue