AutoYADM commit: 2025-05-12 03:31:08

This commit is contained in:
Daniel Fichtinger 2025-05-12 03:31:08 -04:00
parent c6543d13f4
commit e03638a692
2 changed files with 13 additions and 25 deletions

View file

@ -1,25 +1,7 @@
# 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
# arg is either "up" or "down"
define-command visual-vertical -params 1 %{
execute-keys %sh{
line="$kak_cursor_line"
col="$kak_cursor_column"
width="$kak_window_width"
count="$kak_buf_line_count"
path="$kak_buffile"
session="$kak_session"
distance=$($kak_config/scripts/nav.py "$session" "$line" "$col" "$width" "$count" "$path" "$1")
execute-keys %sh{
distance=$($kak_config/scripts/nav.py "$kak_session" "$kak_cursor_line" "$kak_cursor_column" "$kak_window_width" "$kak_buf_line_count" "$kak_buffile" "$1")
echo "$distance"
# TODO: figure out how to jump to this column?
} %sh{
if [ "$1" = "up" ]; then
echo h
else
echo l
fi
}
}
}