aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-06-25 14:51:16 +0530
committerAkshay Nair <phenax5@gmail.com>2026-06-25 14:51:16 +0530
commitd2995bc1d5968b5e8d018135748c6768f920d3c8 (patch)
tree557ef9b87570332a4dc2f24ae95d8dbf46d6418c /autoload
parent2ca3c071b8180e846e379dac8e30db7cbc6b0d7a (diff)
downloadkakoune-config-d2995bc1d5968b5e8d018135748c6768f920d3c8.tar.gz
kakoune-config-d2995bc1d5968b5e8d018135748c6768f920d3c8.zip
Update kakoune + refactor enter-user-mode with -count
Diffstat (limited to 'autoload')
-rw-r--r--autoload/+init.kak12
-rw-r--r--autoload/files.kak6
-rw-r--r--autoload/grep.kak8
-rw-r--r--autoload/marks.kak4
l---------autoload/plugins2
l---------autoload/standard-library2
6 files changed, 18 insertions, 16 deletions
diff --git a/autoload/+init.kak b/autoload/+init.kak
index 43be837..f235e65 100644
--- a/autoload/+init.kak
+++ b/autoload/+init.kak
@@ -39,12 +39,12 @@ hook global RegisterModified '/' %{
add-highlighter -override global/search regex "%reg{/}" 0:search
}
-# Preserve count for user modes (look for alternatives)
-declare-option -hidden int user_mode_count 0
-define-command enter-user-mode-with-count -params 1 %{
- set-option window user_mode_count %val{count}
- enter-user-mode %arg{1}
-}
+# # Preserve count for user modes (look for alternatives)
+# declare-option -hidden int user_mode_count 0
+# define-command enter-user-mode-with-count -params 1 %{
+# set-option window user_mode_count %val{count}
+# enter-user-mode %arg{1}
+# }
# Open directory (bits from explore.kak)
hook global RuntimeError '\d+:\d+: ''(?:edit|e)''(.+): is a directory' %{
diff --git a/autoload/files.kak b/autoload/files.kak
index f7af2f0..652111c 100644
--- a/autoload/files.kak
+++ b/autoload/files.kak
@@ -33,9 +33,9 @@ map global file f ': findfzf<ret>' -docstring 'Fzf'
map global file <c-f> ': findfzf -q %val{selection}<ret>' -docstring 'Fzf selection'
declare-user-mode buffer
-map global user b ': enter-user-mode-with-count buffer<ret>' -docstring 'Buffer mode'
+map global user b ': enter-user-mode -count %val{count} buffer<ret>' -docstring 'Buffer mode'
map global buffer b ': buffer ' -docstring 'Switch buffer'
-map global buffer <ret> ': buffer-jump %opt{user_mode_count}; buffers-show<ret>' -docstring 'Jump to buffer'
+map global buffer <ret> ': buffer-jump %val{count}; buffers-show<ret>' -docstring 'Jump to buffer'
map global buffer n ': buffer-next; buffers-show<ret>' -docstring 'Next buffer'
map global buffer p ': buffer-previous; buffers-show<ret>' -docstring 'Previous buffer'
map global buffer d ': delete-buffer; buffers-show<ret>' -docstring 'Delete buffer'
@@ -55,7 +55,7 @@ def buffers-show %{
def buffer-jump -params 1 %{
evaluate-commands %sh{
if ! [ "$1" == "0" ]; then
- buf=$(echo "$kak_quoted_buflist" | xargs -n1 | head -n "$1" | tail -n1)
+ buf=$(echo "$kak_quoted_buflist" | xargs -n1 | grep -v -E '^([*]debug[*])$' | head -n "$1" | tail -n1)
[ -z "$buf" ] || printf "buffer '%s'" $(echo "$buf" | sed "s/'/''/g")
fi
}
diff --git a/autoload/grep.kak b/autoload/grep.kak
index 5da657f..d0c4b0e 100644
--- a/autoload/grep.kak
+++ b/autoload/grep.kak
@@ -4,9 +4,11 @@ map global file g ':grep ''''<left>' -docstring 'Grep'
map global file * ': grep --case-sensitive %val{selection}<ret>' -docstring 'Grep selection'
define-command grep-write %{
- evaluate-commands -draft %{
- execute-keys '%'
- set-register c %sh{ echo "$kak_selections" | "$kak_config/scripts/grep-write.clj" }
+ set-register c ''
+ evaluate-commands -draft -no-hooks %{
+ # chunky outputs dont work as kak_selections env var
+ execute-keys ',%<a-|>cat > /tmp/.kak-grep-write<ret>'
+ set-register c %sh{ "$kak_config/scripts/grep-write.clj" < /tmp/.kak-grep-write }
}
info %val{reg_c}
}
diff --git a/autoload/marks.kak b/autoload/marks.kak
index 1621308..e3115f9 100644
--- a/autoload/marks.kak
+++ b/autoload/marks.kak
@@ -53,9 +53,9 @@ define-command marks-add-all-buffers %{
}
declare-user-mode marks
-map global user a ': enter-user-mode-with-count marks<ret>' -docstring 'Marks mode'
+map global user a ': enter-user-mode -count %val{count} marks<ret>' -docstring 'Marks mode'
map global user <space> ': marks-select %val{count}<ret>' -docstring 'Select marks'
-map global marks a ': marks-add %val{buffile} %opt{user_mode_count}<ret>' -docstring 'Create new mark from buffer'
+map global marks a ': marks-add %val{buffile} %val{count}<ret>' -docstring 'Create new mark from buffer'
map global marks A ': marks-add-all-buffers<ret>' -docstring 'Load all buffer files as marks'
map global marks d ': marks-delete %val{buffile}<ret>' -docstring 'Delete mark'
map global marks C ': marks-clear<ret>' -docstring 'Clear mark'
diff --git a/autoload/plugins b/autoload/plugins
index b047d01..48b254e 120000
--- a/autoload/plugins
+++ b/autoload/plugins
@@ -1 +1 @@
-/nix/store/9i261s6yakxhcfp5b7qcpw2qki0cshcy-kakoune-2026.04.12/share/kak/autoload/plugins \ No newline at end of file
+/nix/store/w7qkp5awx5s423qijsmxm3nvw6lqnxd2-kakoune-2026.05.21/share/kak/autoload/plugins \ No newline at end of file
diff --git a/autoload/standard-library b/autoload/standard-library
index 8d5b180..91e7db0 120000
--- a/autoload/standard-library
+++ b/autoload/standard-library
@@ -1 +1 @@
-/nix/store/9i261s6yakxhcfp5b7qcpw2qki0cshcy-kakoune-2026.04.12/share/kak/rc \ No newline at end of file
+/nix/store/w7qkp5awx5s423qijsmxm3nvw6lqnxd2-kakoune-2026.05.21/share/kak/rc \ No newline at end of file