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
|
@ -7,7 +7,6 @@ bundle inc-dec.kak https://gitlab.com/Screwtapello/kakoune-inc-dec %{
|
||||||
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
|
||||||
}
|
}
|
||||||
|
@ -26,7 +25,6 @@ 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
|
||||||
|
@ -45,4 +43,3 @@ bundle easymotion.kak https://git.sr.ht/~voroskoi/easymotion.kak %{
|
||||||
bundle byline.kak https://github.com/evanrelf/byline.kak %{
|
bundle byline.kak https://github.com/evanrelf/byline.kak %{
|
||||||
require-module "byline"
|
require-module "byline"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,10 @@ 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{
|
||||||
|
@ -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