kakoune: add keys to send selection and paragraph to the repl

This commit is contained in:
2026-07-18 00:27:15 +02:00
parent 6034323fb9
commit 6949fb75a0

View File

@@ -38,6 +38,8 @@ map global -docstring 'Grep previous match' file-mode 'p' ': grep-prev-match<ret
map global -docstring 'Grep current file' file-mode 'l' ':grep-file ' map global -docstring 'Grep current file' file-mode 'l' ':grep-file '
map global -docstring 'Grep current file' file-mode 'L' ': grep-file %val{selection}<ret>' map global -docstring 'Grep current file' file-mode 'L' ': grep-file %val{selection}<ret>'
map global -docstring 'Delete buffer' file-mode 'x' ': delete-buffer ' map global -docstring 'Delete buffer' file-mode 'x' ': delete-buffer '
map global -docstring 'REPL send selection' file-mode 'u' ': repl-send-text<ret>'
map global -docstring 'REPL send paragraph' file-mode 'U' ': repl-send-paragraph<ret>'
declare-user-mode git-mode declare-user-mode git-mode
map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>' map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
@@ -127,6 +129,10 @@ define-command -override open-create-in-dir %{
execute-keys ': edit ' %sh{dirname "$kak_buffile"}/ execute-keys ': edit ' %sh{dirname "$kak_buffile"}/
} }
define-command -override repl-send-paragraph %{
execute-keys -draft '<a-i>p: repl-send-text<ret>'
}
define-command git-log-show-current-commit %{ define-command git-log-show-current-commit %{
execute-keys ';<a-/>^commit\s[0-9a-f]+<ret>b' execute-keys ';<a-/>^commit\s[0-9a-f]+<ret>b'
git show %val{selection} git show %val{selection}