From 2333c7d56be15e697c8f8ca40622021776a1dd42 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 12 Oct 2025 21:38:24 +0530 Subject: Kakoune setup init --- autoload/cursorword.kak | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 autoload/cursorword.kak (limited to 'autoload/cursorword.kak') diff --git a/autoload/cursorword.kak b/autoload/cursorword.kak new file mode 100644 index 0000000..9c30f99 --- /dev/null +++ b/autoload/cursorword.kak @@ -0,0 +1,12 @@ +declare-option -hidden regex curword + +hook global NormalIdle .* %{ + eval -draft %{try %{ + exec w \A\w+\z + set-option buffer curword "\b\Q%val{selection}\E\b" + } catch %{ + set-option buffer curword '' + }} +} + +add-highlighter global/ dynregex '%opt{curword}' 0:CurWord -- cgit v1.3.1