AutoYADM commit: 2025-05-12 03:47:08
This commit is contained in:
parent
e03638a692
commit
f6bcdb55db
2 changed files with 20 additions and 14 deletions
|
@ -100,11 +100,11 @@ def softtabstop-insert-backspace -hidden %{
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use a hook to enable/disable key mappings such that '\' properly allows disabling specialized <tab> behavior
|
# Use a hook to enable/disable key mappings such that '\' properly allows disabling specialized <tab> behavior
|
||||||
hook global ModeChange 'push:.+:insert' %{
|
# hook global ModeChange 'push:.+:insert' %{
|
||||||
map buffer insert <tab> '<a-;>:softtabstop-insert-tab<ret>'
|
# map buffer insert <tab> '<a-;>:softtabstop-insert-tab<ret>'
|
||||||
map buffer insert <backspace> '<a-;>:softtabstop-insert-backspace<ret>'
|
# map buffer insert <backspace> '<a-;>:softtabstop-insert-backspace<ret>'
|
||||||
}
|
# }
|
||||||
hook global ModeChange 'pop:insert:normal' %{
|
# hook global ModeChange 'pop:insert:normal' %{
|
||||||
unmap buffer insert <tab> '<a-;>:softtabstop-insert-tab<ret>'
|
# unmap buffer insert <tab> '<a-;>:softtabstop-insert-tab<ret>'
|
||||||
unmap buffer insert <backspace> '<a-;>:softtabstop-insert-backspace<ret>'
|
# unmap buffer insert <backspace> '<a-;>:softtabstop-insert-backspace<ret>'
|
||||||
}
|
# }
|
||||||
|
|
|
@ -1,7 +1,16 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
# TODO: works great when going down, however there are problem
|
# TODO: works great for moving within wrapped line,
|
||||||
# with going UP if the line above is also wrapped
|
# 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
|
import sys
|
||||||
|
|
||||||
|
@ -33,7 +42,4 @@ if 0 <= new_visual_row < len(chunks):
|
||||||
key = "h" if direction == "up" else "l"
|
key = "h" if direction == "up" else "l"
|
||||||
print(f"{diff}{key}")
|
print(f"{diff}{key}")
|
||||||
else:
|
else:
|
||||||
print(
|
print("j" if direction == "down" else "k")
|
||||||
"j" if direction == "down" else "k"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue