AutoYADM commit: 2025-05-08 22:55:43
This commit is contained in:
parent
72fa883888
commit
148237e9e0
3 changed files with 50 additions and 30 deletions
|
@ -3,46 +3,43 @@ source "%val{config}/bundle/kak-bundle/rc/kak-bundle.kak"
|
||||||
bundle-noload kak-bundle https://codeberg.org/jdugan6240/kak-bundle
|
bundle-noload kak-bundle https://codeberg.org/jdugan6240/kak-bundle
|
||||||
|
|
||||||
bundle inc-dec.kak https://gitlab.com/Screwtapello/kakoune-inc-dec %{
|
bundle inc-dec.kak https://gitlab.com/Screwtapello/kakoune-inc-dec %{
|
||||||
map -docstring "increment" global normal <c-a> %{: inc-dec-modify-numbers + %val{count}<ret>}
|
map -docstring "increment" global normal <c-a> %{: inc-dec-modify-numbers + %val{count}<ret>}
|
||||||
map -docstring "decrement" global normal <c-x> %{: inc-dec-modify-numbers - %val{count}<ret>}
|
map -docstring "decrement" global normal <c-x> %{: inc-dec-modify-numbers - %val{count}<ret>}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bundle auto-pairs.kak https://github.com/alexherbo2/auto-pairs.kak %{
|
bundle auto-pairs.kak https://github.com/alexherbo2/auto-pairs.kak %{
|
||||||
enable-auto-pairs
|
enable-auto-pairs
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle fzf.kak https://github.com/andreyorst/fzf.kak %{
|
bundle fzf.kak https://github.com/andreyorst/fzf.kak %{
|
||||||
require-module fzf
|
require-module fzf
|
||||||
set-option global fzf_highlight_command "bat"
|
set-option global fzf_highlight_command "bat"
|
||||||
require-module fzf-grep
|
require-module fzf-grep
|
||||||
set-option global fzf_grep_command "rg"
|
set-option global fzf_grep_command "rg"
|
||||||
require-module fzf-file
|
require-module fzf-file
|
||||||
set-option global fzf_file_command "fd . --no-ignore-vcs"
|
set-option global fzf_file_command "fd . --no-ignore-vcs"
|
||||||
map -docstring "fzf mode" global user f ": fzf-mode<ret>"
|
map -docstring "fzf mode" global user f ": fzf-mode<ret>"
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle luar https://github.com/gustavo-hms/luar %{
|
bundle luar https://github.com/gustavo-hms/luar %{
|
||||||
require-module luar
|
require-module luar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bundle easymotion.kak https://git.sr.ht/~voroskoi/easymotion.kak %{
|
bundle easymotion.kak https://git.sr.ht/~voroskoi/easymotion.kak %{
|
||||||
require-module easymotion
|
require-module easymotion
|
||||||
unmap global easymotion h
|
unmap global easymotion h
|
||||||
unmap global easymotion j
|
unmap global easymotion j
|
||||||
unmap global easymotion k
|
unmap global easymotion k
|
||||||
unmap global easymotion l
|
unmap global easymotion l
|
||||||
map global normal <ret> ': enter-user-mode easymotion<ret>'
|
map global normal <ret> ': enter-user-mode easymotion<ret>'
|
||||||
|
|
||||||
map global easymotion -docstring %{easymotion line ↓} <n> ": easymotion-j<ret>"
|
map global easymotion -docstring %{easymotion line ↓} <n> ": easymotion-j<ret>"
|
||||||
map global easymotion -docstring %{easymotion line ↑} <e> ": easymotion-k<ret>"
|
map global easymotion -docstring %{easymotion line ↑} <e> ": easymotion-k<ret>"
|
||||||
map global easymotion -docstring %{easymotion streak →} <i> ": easymotion-streak-forward<ret>"
|
map global easymotion -docstring %{easymotion streak →} <i> ": easymotion-streak-forward<ret>"
|
||||||
map global easymotion -docstring %{easymotion streak ←} <m> ": easymotion-streak-backward<ret>"
|
map global easymotion -docstring %{easymotion streak ←} <m> ": easymotion-streak-backward<ret>"
|
||||||
set-option global easymotion_chars "tnseriplfuwydhcxoaqz"
|
set-option global easymotion_chars "tnseriplfuwydhcxoaqz"
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle byline.kak https://github.com/evanrelf/byline.kak %{
|
bundle byline.kak https://github.com/evanrelf/byline.kak %{
|
||||||
require-module "byline"
|
require-module "byline"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,16 +4,20 @@ colorscheme ashen
|
||||||
set-option global ui_options terminal_assistant=none
|
set-option global ui_options terminal_assistant=none
|
||||||
|
|
||||||
hook global ModuleLoaded wayland %{
|
hook global ModuleLoaded wayland %{
|
||||||
set-option global termcmd 'footclient sh -c'
|
set-option global termcmd 'footclient sh -c'
|
||||||
|
}
|
||||||
|
|
||||||
|
hook global WinSetOption filetype=kak %{
|
||||||
|
set-option window formatcmd "%val{config}/scripts/kakfmt"
|
||||||
}
|
}
|
||||||
|
|
||||||
# open tutor (needs curl)
|
# open tutor (needs curl)
|
||||||
define-command trampoline -docstring "open a tutorial" %{
|
define-command trampoline -docstring "open a tutorial" %{
|
||||||
evaluate-commands %sh{
|
evaluate-commands %sh{
|
||||||
tramp_file=$(mktemp -t "kakoune-trampoline.XXXXXXXX")
|
tramp_file=$(mktemp -t "kakoune-trampoline.XXXXXXXX")
|
||||||
echo "edit -fifo $tramp_file *TRAMPOLINE*"
|
echo "edit -fifo $tramp_file *TRAMPOLINE*"
|
||||||
curl -s https://raw.githubusercontent.com/mawww/kakoune/master/contrib/TRAMPOLINE -o "$tramp_file"
|
curl -s https://raw.githubusercontent.com/mawww/kakoune/master/contrib/TRAMPOLINE -o "$tramp_file"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set-option global tabstop 4
|
set-option global tabstop 4
|
||||||
|
@ -30,6 +34,7 @@ add-highlighter global/ wrap -word -indent
|
||||||
map -docstring "yank the selection into the clipboard" global user y "<a-|> wl-copy<ret>"
|
map -docstring "yank the selection into the clipboard" global user y "<a-|> wl-copy<ret>"
|
||||||
|
|
||||||
map -docstring "paste the clipboard" global user p "<a-!> wl-paste<ret>"
|
map -docstring "paste the clipboard" global user p "<a-!> wl-paste<ret>"
|
||||||
|
map -docstring "paste the clipboard before" global user P "! wl-paste<ret>"
|
||||||
|
|
||||||
map -docstring "quit" global user q ":q<ret>"
|
map -docstring "quit" global user q ":q<ret>"
|
||||||
|
|
||||||
|
|
18
.config/kak/scripts/kakfmt
Executable file
18
.config/kak/scripts/kakfmt
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $Indent = 0;
|
||||||
|
my $Blank_Lines = 0;
|
||||||
|
my $Open = qr/[{\[(]$/;
|
||||||
|
my $Close = qr/^[}\])]/;
|
||||||
|
while (<>) {
|
||||||
|
s/^\h*//;
|
||||||
|
$Blank_Lines++, next if m/^$/;
|
||||||
|
my $Comment = m/^#/;
|
||||||
|
$Indent-- if m/$Close/ and not $Comment;
|
||||||
|
$Blank_Lines = 0, print "\n" if $Blank_Lines;
|
||||||
|
print "\t" x $Indent, $_;
|
||||||
|
$Indent++ if m/$Open/ and not $Comment;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue