diff --git a/.config/kak/autoload/nav.kak b/.config/kak/autoload/nav.kak new file mode 100644 index 00000000..b2e8b48d --- /dev/null +++ b/.config/kak/autoload/nav.kak @@ -0,0 +1,14 @@ +# 1. Find actual visual column width of content area +# 2. Parse current cursor position and buffer line content +# 3. Split the logical line into chunks based on wrap width +# 4. Move cursor to the same column offset on the wrapped line + +define-command visual-down %{ + nop %sh{ + line="$kak_cursor_line" + col="$kak_cursor_column" + width="$kak_window_width" + count="$kak_buf_line_count" + } +} + diff --git a/.config/kak/scripts/nav.py b/.config/kak/scripts/nav.py new file mode 100755 index 00000000..f3cb0558 --- /dev/null +++ b/.config/kak/scripts/nav.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +import sys + +line = sys.argv[1] +col = int(sys.argv[2]) +width = int(sys.argv[3]) +count = int(sys.argv[4]) +path = sys.argv[5] +