kakoune: add/modify keys (add git, make)
This commit is contained in:
@@ -15,28 +15,48 @@ nop %sh{
|
||||
[ -e "$kak_config/autoload/stdlib" ] || ln -s "$kak_runtime/autoload" "$kak_config/autoload/stdlib"
|
||||
}
|
||||
|
||||
declare-user-mode file-mode
|
||||
declare-user-mode options-mode
|
||||
|
||||
map global -docstring 'File' user 'f' ': enter-user-mode file-mode<ret>'
|
||||
map global -docstring 'Buffer' user ' ' ': b '
|
||||
|
||||
declare-user-mode file-mode
|
||||
map global -docstring 'Search/open' user 's' ': enter-user-mode file-mode<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 '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 '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/create in dir' file-mode 'c' ': open-create-in-dir<ret>'
|
||||
|
||||
declare-user-mode git-mode
|
||||
map global -docstring 'Git' user 'g' ': enter-user-mode git-mode<ret>'
|
||||
|
||||
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 'Grep' git-mode 'g' ': git grep '
|
||||
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 diff' git-mode 's' ': git show-diff<ret>'
|
||||
map global -docstring 'Hide diff' git-mode 'h' ': git hide-diff<ret>'
|
||||
map global -docstring 'Next hunk' git-mode 'n' ': git next-hunk<ret>'
|
||||
map global -docstring 'Prev hunk' git-mode 'p' ': git prev-hunk<ret>'
|
||||
|
||||
declare-user-mode options-mode
|
||||
map global -docstring 'Options' user 'o' ': enter-user-mode options-mode<ret>'
|
||||
|
||||
map global -docstring 'LP Dark mode' options-mode 'd' ': colorscheme five-colors-dark<ret>'
|
||||
map global -docstring 'LP Light mode' options-mode 'l' ': colorscheme five-colors-light<ret>'
|
||||
map global -docstring 'Five Dark mode' options-mode 'd' ': colorscheme five-colors-dark<ret>'
|
||||
map global -docstring 'Five Light mode' options-mode 'l' ': colorscheme five-colors-light<ret>'
|
||||
map global -docstring 'Light mode' options-mode 'L' ': colorscheme one-light<ret>'
|
||||
map global -docstring 'Dark mode' options-mode 'D' ': colorscheme one-darker<ret>'
|
||||
|
||||
declare-user-mode make-mode
|
||||
map global -docstring 'Make' user 'k' ': enter-user-mode make-mode<ret>'
|
||||
|
||||
map global -docstring 'Make' make-mode 'a' ':make '
|
||||
map global -docstring 'Next' make-mode 'n' ': make-next-error<ret>'
|
||||
map global -docstring 'Previous' make-mode 'p' ': make-previous-error<ret>'
|
||||
map global -docstring 'General messages' make-mode 'g' ': set window make_error_pattern "^([^:\n]+):(\d+):(?:(\d+):)? ([^\n]+)?"<ret>'
|
||||
|
||||
evaluate-commands %sh{
|
||||
if [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
echo "
|
||||
@@ -77,6 +97,11 @@ define-command -override open-create-in-dir %{
|
||||
execute-keys ': edit ' %sh{dirname "$kak_buffile"}/
|
||||
}
|
||||
|
||||
define-command git-log-show-current-commit %{
|
||||
execute-keys ';<a-/>^commit\s[0-9a-f]+<ret>b'
|
||||
git show %val{selection}
|
||||
}
|
||||
|
||||
set-face global JumpLabel 'rgb:faf8f5,rgb:af8842+F'
|
||||
|
||||
# CHANGE STATUS BAR COLOR IN INSERT MODE
|
||||
@@ -133,7 +158,7 @@ bundle-theme kakoune-themes 'https://codeberg.org/anhsirk0/kakoune-themes'
|
||||
# FZF
|
||||
|
||||
bundle fzf.kak 'https://github.com/andreyorst/fzf.kak' %{
|
||||
map global -docstring 'FZF menu' user s ': fzf-mode<ret>'
|
||||
map global -docstring 'FZF menu' user 'f' ': fzf-mode<ret>'
|
||||
require-module fzf
|
||||
set-option global fzf_highlight_command "bat"
|
||||
}
|
||||
@@ -190,15 +215,15 @@ bundle 'peneira' 'https://github.com/gustavo-hms/peneira' %{
|
||||
|
||||
map global -docstring 'Buffer' user ' ' ': buffers<ret>'
|
||||
|
||||
declare-user-mode peneira-mode
|
||||
map global -docstring 'Peneira' user 'd' ': enter-user-mode peneira-mode<ret>'
|
||||
map global -docstring 'Git files' peneira-mode 'a' ': peneira-git-files<ret>'
|
||||
map global -docstring 'Buffers' peneira-mode 'b' ': buffers<ret>'
|
||||
map global -docstring 'Files' peneira-mode 'f' ': peneira-files<ret>'
|
||||
map global -docstring 'Files' peneira-mode 'F' ': peneira-local-files<ret>'
|
||||
map global -docstring 'Lines' peneira-mode 'l' ': peneira-lines<ret>'
|
||||
map global -docstring 'Symbols' peneira-mode 's' ': peneira-symbols<ret>'
|
||||
map global -docstring 'Recent files' peneira-mode 'r' ': peneira-recent-files<ret>'
|
||||
# declare-user-mode peneira-mode
|
||||
# map global -docstring 'Peneira' user 'd' ': enter-user-mode peneira-mode<ret>'
|
||||
map global -docstring 'Git files' file-mode 'a' ': peneira-git-files<ret>'
|
||||
map global -docstring 'Buffers' file-mode 'b' ': buffers<ret>'
|
||||
map global -docstring 'Files' file-mode 'f' ': peneira-files<ret>'
|
||||
map global -docstring 'Files' file-mode 'F' ': peneira-local-files<ret>'
|
||||
map global -docstring 'Lines' file-mode 'l' ': peneira-lines<ret>'
|
||||
map global -docstring 'Symbols' file-mode 's' ': peneira-symbols<ret>'
|
||||
map global -docstring 'Recent files' file-mode 'r' ': peneira-recent-files<ret>'
|
||||
}
|
||||
|
||||
# LOCAL
|
||||
|
||||
Reference in New Issue
Block a user