kakoune: add key file open recent with prompt menu
This commit is contained in:
@@ -21,6 +21,7 @@ map global -docstring "Buffer" user ' ' ': b '
|
|||||||
map global -docstring "Open (git)" file-mode 'a' ': file-open-git<ret>'
|
map global -docstring "Open (git)" file-mode 'a' ': file-open-git<ret>'
|
||||||
map global -docstring "Git diff file" file-mode 'd' ': git diff %val{buffile}<ret>'
|
map global -docstring "Git diff file" file-mode 'd' ': git diff %val{buffile}<ret>'
|
||||||
map global -docstring "Open (fd)" file-mode 'f' ': file-open<ret>'
|
map global -docstring "Open (fd)" file-mode 'f' ': file-open<ret>'
|
||||||
|
map global -docstring "Open (recent)" file-mode 'r' ': file-open-recent<ret>'
|
||||||
map global -docstring "Git grep" file-mode 'g' ': git grep '
|
map global -docstring "Git grep" file-mode 'g' ': git grep '
|
||||||
map global -docstring "Open (nnn)" file-mode 'n' ': nnn-open %val{buffile}<ret>'
|
map global -docstring "Open (nnn)" file-mode 'n' ': nnn-open %val{buffile}<ret>'
|
||||||
map global -docstring "Open (nnn)" file-mode 'N' ': nnn-open .<ret>'
|
map global -docstring "Open (nnn)" file-mode 'N' ': nnn-open .<ret>'
|
||||||
@@ -44,6 +45,10 @@ define-command -override file-open-git %{
|
|||||||
prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} }
|
prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define-command -override file-open-recent %{
|
||||||
|
prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} }
|
||||||
|
}
|
||||||
|
|
||||||
define-command -override -params 1 nnn-open %{
|
define-command -override -params 1 nnn-open %{
|
||||||
terminal nnn-kak-edit %arg{1} %val{session} %val{client}
|
terminal nnn-kak-edit %arg{1} %val{session} %val{client}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user