kakoune: add and modify search keys
This commit is contained in:
@@ -15,7 +15,7 @@ nop %sh{
|
||||
[ -e "$kak_config/autoload/stdlib" ] || ln -s "$kak_runtime/autoload" "$kak_config/autoload/stdlib"
|
||||
}
|
||||
|
||||
map global -docstring 'Buffer' user ' ' ': b '
|
||||
map global -docstring 'Buffer' user ' ' ': buffer '
|
||||
|
||||
declare-user-mode file-mode
|
||||
map global -docstring 'Search/open' user 's' ': enter-user-mode file-mode<ret>'
|
||||
@@ -24,11 +24,17 @@ map global -docstring 'Open (git)' file-mode 'a' ': file-open-git<ret>'
|
||||
map global -docstring 'Open (fd)' file-mode 'f' ': file-open<ret>'
|
||||
map global -docstring 'Open (fd -H)' file-mode 'h' ': file-open-with-hidden<ret>'
|
||||
map global -docstring 'Open (recent)' file-mode 'r' ': file-open-recent<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 'd' ': nnn-open %val{buffile}<ret>'
|
||||
map global -docstring 'Open (nnn)' file-mode 'D' ': nnn-open .<ret>'
|
||||
map global -docstring 'Open/create in dir' file-mode 'c' ': open-create-in-dir<ret>'
|
||||
map global -docstring 'ctags file symbols' file-mode 's' ': ctags-file-symbols<ret>'
|
||||
map global -docstring 'ctags project symbols' file-mode 'p' ': ctags-project-symbols<ret>'
|
||||
map global -docstring 'ctags project symbols' file-mode 'w' ': ctags-project-symbols<ret>'
|
||||
map global -docstring 'Grep' file-mode 'g' ':grep '
|
||||
map global -docstring 'Grep next match' file-mode 'n' ': grep-next-match<ret>'
|
||||
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 %val{selection}<ret>'
|
||||
map global -docstring 'Delete buffer' file-mode 'x' ': delete-buffer '
|
||||
|
||||
declare-user-mode git-mode
|
||||
map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
|
||||
@@ -37,7 +43,8 @@ map global -docstring 'Blame' git-mode 'b' ': git blame<ret>'
|
||||
map global -docstring 'Blame' git-mode 'B' ': git blame-jump<ret>'
|
||||
map global -docstring 'Diff file' git-mode 'd' ': git diff %val{buffile}<ret>'
|
||||
map global -docstring 'Diff' git-mode 'D' ': git diff<ret>'
|
||||
map global -docstring 'Grep' git-mode 'g' ': git grep '
|
||||
map global -docstring 'Grep' git-mode 'g' ':git grep '
|
||||
map global -docstring 'Grep' git-mode 'G' ': git grep %val{selection}<ret>'
|
||||
map global -docstring 'Log' git-mode 'l' ': git log -- %val{buffile}<ret>'
|
||||
map global -docstring 'Log' git-mode 'L' ': git log<ret>'
|
||||
map global -docstring 'Show branch' git-mode 'c' ': git show-branch<ret>'
|
||||
@@ -99,6 +106,10 @@ define-command -override file-open-recent %{
|
||||
prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} }
|
||||
}
|
||||
|
||||
define-command -override grep-file -params 1- %{
|
||||
grep %arg{@} -- %val{buffile}
|
||||
}
|
||||
|
||||
define-command -override -params 1 nnn-open %{
|
||||
terminal nnn-kak-edit %arg{1} %val{session} %val{client}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user