AutoYADM commit: 2025-07-01 15:24:24
This commit is contained in:
parent
4c7960a6a8
commit
163abe5562
4 changed files with 42 additions and 15 deletions
|
@ -197,7 +197,7 @@ pipe-visible=[wl-copy] Control+Mod1+Shift+v
|
||||||
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||||
pipe-scrollback=[wl-copy] Control+Mod1+Shift+p
|
pipe-scrollback=[wl-copy] Control+Mod1+Shift+p
|
||||||
# pipe-selected=[xargs -r firefox] none
|
# pipe-selected=[xargs -r firefox] none
|
||||||
pipe-command-output=[wl-copy] Control+Shift+y
|
pipe-command-output=[wl-copy] Control+Mod1+Shift+y
|
||||||
show-urls-launch=Control+Shift+o
|
show-urls-launch=Control+Shift+o
|
||||||
show-urls-copy=Control+Mod1+Shift+o
|
show-urls-copy=Control+Mod1+Shift+o
|
||||||
# show-urls-persistent=Control+Mod1+Shift+p
|
# show-urls-persistent=Control+Mod1+Shift+p
|
||||||
|
|
|
@ -55,8 +55,12 @@ add-highlighter shared/kakrc/shell6 region -recurse '\(' '(^|\h)\K-?shell-script
|
||||||
add-highlighter shared/kakrc/shell7 region -recurse '\[' '(^|\h)\K-?shell-script(-completion|-candidates)?\h+%\[' '\]' ref sh
|
add-highlighter shared/kakrc/shell7 region -recurse '\[' '(^|\h)\K-?shell-script(-completion|-candidates)?\h+%\[' '\]' ref sh
|
||||||
add-highlighter shared/kakrc/shell8 region -recurse '<' '(^|\h)\K-?shell-script(-completion|-candidates)?\h+%<' '>' ref sh
|
add-highlighter shared/kakrc/shell8 region -recurse '<' '(^|\h)\K-?shell-script(-completion|-candidates)?\h+%<' '>' ref sh
|
||||||
|
|
||||||
|
## BEGIN PATCH
|
||||||
|
# add-highlighter shared/kakrc/code
|
||||||
|
## END PATCH
|
||||||
|
|
||||||
evaluate-commands %sh{
|
evaluate-commands %sh{
|
||||||
# Grammar
|
# Grammar
|
||||||
keywords="add-highlighter alias arrange-buffers buffer buffer-next buffer-previous catch
|
keywords="add-highlighter alias arrange-buffers buffer buffer-next buffer-previous catch
|
||||||
change-directory colorscheme debug declare-option declare-user-mode define-command complete-command
|
change-directory colorscheme debug declare-option declare-user-mode define-command complete-command
|
||||||
delete-buffer delete-buffer! echo edit edit! enter-user-mode evaluate-commands execute-keys
|
delete-buffer delete-buffer! echo edit edit! enter-user-mode evaluate-commands execute-keys
|
||||||
|
|
|
@ -1,11 +1,20 @@
|
||||||
declare-option -hidden str mark_saved
|
|
||||||
define-command mark-save %{
|
define-command mark-save %{
|
||||||
|
try %{
|
||||||
execute-keys '"jZ'
|
execute-keys '"jZ'
|
||||||
}
|
echo "Mark saved"
|
||||||
define-command mark-restore %{
|
} catch %{
|
||||||
execute-keys '"jz'
|
info "Couldn't save mark!"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
map global normal <c-s-y> ': echo hi<ret>'
|
define-command mark-restore %{
|
||||||
# map global normal <c-Y> ': mark-save<ret>'
|
try %{
|
||||||
|
execute-keys '"jz'
|
||||||
|
echo "Mark restored"
|
||||||
|
} catch %{
|
||||||
|
info "Couldn't restore mark!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
map global normal <c-Y> ': mark-save<ret>'
|
||||||
map global normal <c-y> ': mark-restore<ret>'
|
map global normal <c-y> ': mark-restore<ret>'
|
||||||
|
|
|
@ -14,20 +14,9 @@ provide-module search-highlight %—
|
||||||
def -hidden -override search-highlight-on nop
|
def -hidden -override search-highlight-on nop
|
||||||
def -hidden -override search-highlight-off fail
|
def -hidden -override search-highlight-off fail
|
||||||
|
|
||||||
# enable the plugin
|
declare-option -hidden bool search_highlight_quit false
|
||||||
define-command -hidden search-highlight-enable-impl %{
|
|
||||||
# register hook to show highlighting during search
|
define-command -hidden search-highlight-clear %{
|
||||||
hook -group search-highlight window RegisterModified '/' %{
|
|
||||||
# check whether already enabled
|
|
||||||
try %{
|
|
||||||
%opt{search_highlight_status}
|
|
||||||
} catch %{
|
|
||||||
# if not, add the highlighter
|
|
||||||
add-highlighter window/search-highlight dynregex '%reg{/}' %exp{0:%opt{search_highlight_face}}
|
|
||||||
# update status tracker
|
|
||||||
set-option window search_highlight_status 'search-highlight-on'
|
|
||||||
# register hook to clear highlighter after leaving search
|
|
||||||
hook -once -group search-highlight window NormalIdle .* %{
|
|
||||||
try %{
|
try %{
|
||||||
# for safety; only run if highlighting is on
|
# for safety; only run if highlighting is on
|
||||||
%opt{search_highlight_status}
|
%opt{search_highlight_status}
|
||||||
|
@ -37,6 +26,31 @@ provide-module search-highlight %—
|
||||||
set-option window search_highlight_status 'search-highlight-off'
|
set-option window search_highlight_status 'search-highlight-off'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# enable the plugin
|
||||||
|
define-command -hidden search-highlight-enable-impl %{
|
||||||
|
# register hook to show highlighting during search
|
||||||
|
hook -group search-highlight window RegisterModified '/' %{
|
||||||
|
# check whether already enabled
|
||||||
|
try %{
|
||||||
|
%opt{search_highlight_status}
|
||||||
|
} catch %{
|
||||||
|
map window prompt <esc> '<a-;>: set-option window search_highlight_quit true<ret>'
|
||||||
|
# if not, add the highlighter
|
||||||
|
add-highlighter window/search-highlight dynregex '%reg{/}' %exp{0:%opt{search_highlight_face}}
|
||||||
|
# update status tracker
|
||||||
|
set-option window search_highlight_status 'search-highlight-on'
|
||||||
|
|
||||||
|
# register hook to clear highlighter after leaving search
|
||||||
|
hook -once -group search-highlight window NormalIdle .* %{
|
||||||
|
try %{
|
||||||
|
%opt{search_highlight_quit}
|
||||||
|
search-highlight-clear
|
||||||
|
} catch %{
|
||||||
|
map window normal <esc> ': search-highlight-clear<ret>'
|
||||||
|
}
|
||||||
|
unmap window prompt <esc>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue