29 lines
1 KiB
Text
29 lines
1 KiB
Text
# <https://github.com/delapouite/kakoune-hump>
|
|
|
|
declare-option regex hump [A-Z][a-z]+|[A-Z]+|[a-z]+
|
|
|
|
define-command -hidden select-current-hump %{
|
|
execute-keys %exp{<a-a>c%opt{hump},%opt{hump}<ret>}
|
|
}
|
|
|
|
define-command -hidden select-next-hump %{
|
|
execute-keys /[A-Z][a-z]+|[A-Z]+|[a-z]+<ret><a-:>
|
|
}
|
|
|
|
define-command -hidden select-previous-hump %{
|
|
execute-keys <a-/>[A-Z][a-z]+|[A-Z]+|[a-z]+<ret><a-:><a-semicolon>
|
|
}
|
|
|
|
define-command -hidden extend-next-hump %{
|
|
execute-keys ?[A-Z][a-z]+|[A-Z]+|[a-z]+<ret><a-:>
|
|
}
|
|
|
|
define-command -hidden extend-previous-hump %{
|
|
execute-keys <a-?>[A-Z][a-z]+|[A-Z]+|[a-z]+<ret><a-:><a-semicolon>
|
|
}
|
|
|
|
map global normal <c-b> ': select-previous-hump<ret>' -docstring 'select prev hump'
|
|
map global normal <c-w> ': select-next-hump<ret>' -docstring 'select next hump'
|
|
map global normal <c-B> ': extend-previous-hump<ret>' -docstring 'extend prev hump'
|
|
map global normal <c-W> ': extend-next-hump<ret>' -docstring 'extend next hump'
|
|
map global normal <c-h> ': select-current-hump<ret>' -docstring 'select current hump'
|