diff --git a/.config/kak/autoload/vim-tab.kak b/.config/kak/autoload/vim-tab.kak index 572bcb8f..c078bdc8 100644 --- a/.config/kak/autoload/vim-tab.kak +++ b/.config/kak/autoload/vim-tab.kak @@ -100,11 +100,11 @@ def softtabstop-insert-backspace -hidden %{ } # Use a hook to enable/disable key mappings such that '\' properly allows disabling specialized behavior -hook global ModeChange 'push:.+:insert' %{ - map buffer insert ':softtabstop-insert-tab' - map buffer insert ':softtabstop-insert-backspace' -} -hook global ModeChange 'pop:insert:normal' %{ - unmap buffer insert ':softtabstop-insert-tab' - unmap buffer insert ':softtabstop-insert-backspace' -} +# hook global ModeChange 'push:.+:insert' %{ +# map buffer insert ':softtabstop-insert-tab' +# map buffer insert ':softtabstop-insert-backspace' +# } +# hook global ModeChange 'pop:insert:normal' %{ +# unmap buffer insert ':softtabstop-insert-tab' +# unmap buffer insert ':softtabstop-insert-backspace' +# } diff --git a/.config/kak/scripts/nav.py b/.config/kak/scripts/nav.py index 9c9b9609..d37d9289 100755 --- a/.config/kak/scripts/nav.py +++ b/.config/kak/scripts/nav.py @@ -1,7 +1,16 @@ #!/usr/bin/env python -# TODO: works great when going down, however there are problem -# with going UP if the line above is also wrapped +# TODO: works great for moving within wrapped line, +# not quite when moving from wrapped to normal and vice versa +# 1. Detect line-wrap status of target line before deciding to do vertical jump or visual column shift +# 2. Load the target line in addition +# 3. Use the same wrap_width logic to compare visual row availability +# on the target line + +# Basically, look at the target line, and figure out the logical column +# number that corresponds to the visual column number we see right now. + +# Also TODO: once this is ironed out, re-write it in Rust for le speed import sys @@ -33,7 +42,4 @@ if 0 <= new_visual_row < len(chunks): key = "h" if direction == "up" else "l" print(f"{diff}{key}") else: - print( - "j" if direction == "down" else "k" - ) - + print("j" if direction == "down" else "k")