more commands
This commit is contained in:
parent
9e3292de10
commit
f6314c8eb4
1 changed files with 30 additions and 16 deletions
46
kakrc
46
kakrc
|
|
@ -3,33 +3,47 @@ colorscheme desertex
|
||||||
add-highlighter global/ number-lines -relative -hlcursor
|
add-highlighter global/ number-lines -relative -hlcursor
|
||||||
add-highlighter global/ show-matching
|
add-highlighter global/ show-matching
|
||||||
|
|
||||||
# this messes with jumplist
|
|
||||||
# map -docstring "jump forward" global normal <tab> ":exec <lt>c-i<gt><ret>"
|
|
||||||
map -docstring "toogle comment" global user / ":comment-line<ret>"
|
|
||||||
|
|
||||||
hook global BufWritePost .* %{ git update-diff }
|
hook global BufWritePost .* %{ git update-diff }
|
||||||
|
|
||||||
define-command zellij-fzf %{
|
|
||||||
zellij-terminal-horizontal sh -c "find . -type f -not -path *.git* | fzf --bind 'enter:execute(echo eval -client %val{client} e {} | kak -p %val{session})+execute(zellij action close-pane)'"
|
|
||||||
}
|
|
||||||
|
|
||||||
map -docstring "git" global user g ":enter-user-mode git<ret>"
|
|
||||||
map -docstring "find" global user f ":enter-user-mode search<ret>"
|
|
||||||
map -docstring "format" global user F ":lsp-formatting<ret>"
|
|
||||||
map -docstring "format" global user K ":lsp-hover-buffer<ret>"
|
|
||||||
|
|
||||||
eval %sh{kak-lsp}
|
eval %sh{kak-lsp}
|
||||||
lsp-enable
|
lsp-enable
|
||||||
lsp-auto-hover-enable
|
lsp-auto-hover-enable
|
||||||
|
|
||||||
# zellij-terminal-horizontal fzf --bind "enter:execute(kak -C %val{session} {})"
|
set-option global modelinefmt "%opt{lsp_modeline} %opt{modelinefmt}"
|
||||||
#
|
|
||||||
|
define-command split-find-file %{
|
||||||
|
zellij-terminal-horizontal fzf --bind "enter:execute(kak -C %val{session} {})"
|
||||||
|
}
|
||||||
|
|
||||||
|
define-command find-file %{
|
||||||
|
zellij-terminal-horizontal sh -c "find . -type f -not -path *.git* | fzf --bind 'enter:execute(echo eval -client %val{client} e {} | kak -p %val{session})+execute(zellij action close-pane)'"
|
||||||
|
}
|
||||||
|
|
||||||
|
define-command vifm-split %{
|
||||||
|
zellij-terminal-horizontal sh -c "kak -c %val{session} $(vifm --choose-files -)"
|
||||||
|
}
|
||||||
|
|
||||||
|
define-command vifm %{
|
||||||
|
zellij-terminal-horizontal sh -c "echo eval -client %val{client} e $(vifm --choose-files -) | kak -p %val{session} && zellij action close-pane"
|
||||||
|
}
|
||||||
|
|
||||||
|
map -docstring 'lsp' global user l ':enter-user-mode lsp<ret>'
|
||||||
|
map -docstring "git" global user g ":enter-user-mode git<ret>"
|
||||||
|
map -docstring "find" global user f ":enter-user-mode search<ret>"
|
||||||
|
|
||||||
|
# user
|
||||||
|
map -docstring "toogle comment" global user c ":comment-line<ret>"
|
||||||
|
map -docstring "format" global user F ":lsp-formatting<ret>"
|
||||||
|
map -docstring "format" global user K ":lsp-hover-buffer<ret>"
|
||||||
|
|
||||||
|
# git
|
||||||
declare-user-mode git
|
declare-user-mode git
|
||||||
map -docstring "preview" global git p ":git show-diff<ret>"
|
map -docstring "preview" global git p ":git show-diff<ret>"
|
||||||
map -docstring "next change" global git j ":git next-hunk<ret>"
|
map -docstring "next change" global git j ":git next-hunk<ret>"
|
||||||
map -docstring "previous change" global git k ":git prev-hunk<ret>"
|
map -docstring "previous change" global git k ":git prev-hunk<ret>"
|
||||||
map -docstring "previous lazygit" global git g ":zellij-terminal-horizontal lazygit<ret>"
|
map -docstring "previous lazygit" global git g ":zellij-terminal-horizontal lazygit<ret>"
|
||||||
|
|
||||||
|
# search
|
||||||
declare-user-mode search
|
declare-user-mode search
|
||||||
map -docstring "file" global search f ":zellij-fzf<ret>"
|
map -docstring "file" global search f ":find-file<ret>"
|
||||||
map -docstring "grep" global search g ":grep<ret>"
|
map -docstring "grep" global search g ":grep<ret>"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue