You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optionally, a yazi-like oil navigation method, that imho some would slightly prefer.
- <left> / h and <right> / l operate as cursor_left and cursor_right if not is_oil_open
- <left> / h and <right> / l operate as cursor_left and cursor_right if is_oil_open and in Insert mode
- if is_oil_open and normal mode then
<left> / h operate as action.parent
<right> / l operate as select if oil.get_cursor_entry().type == directory
The end result is a tighter key sequence navigating only with left and right until over the target file and pressing enter. Not required to (but still can) use minus key for parent. Not required to (but still can) use enter key to change directory.
Realized either by add a mux util into your api or maybe just in your recipe docs.
pseudocode:
function mux(normal_action, oil_action)
if is_oil_open then oil_action()
else normal_action()
end
end
function maybe_right_maybe_cd()
if is_oil_open and oil.get_cursor_entry().type == directory then
action.select() aka change directory
else
go_right()
end
function maybe_left_maybe_parent()
if is_oil_open then
action.parent()
else
go_left()
end
end
vim.keymap.set("n", "<left>", mux(go_left, actions.parent.callback), "parent")
vim.keymap.set("n", "<right>", mux(go_right, maybe_go_right_maybe_cd), "right")
Provide background
I implemented it for myself and liked it. Imho, a slightly tighter navigation in a direction vim users tend to like.
What is the significance of this feature?
nice to have
Additional details
No response
The text was updated successfully, but these errors were encountered:
Did you check existing requests?
Describe the feature
Optionally, a yazi-like oil navigation method, that imho some would slightly prefer.
The end result is a tighter key sequence navigating only with left and right until over the target file and pressing enter. Not required to (but still can) use minus key for parent. Not required to (but still can) use enter key to change directory.
Realized either by add a mux util into your api or maybe just in your recipe docs.
pseudocode:
Provide background
I implemented it for myself and liked it. Imho, a slightly tighter navigation in a direction vim users tend to like.
What is the significance of this feature?
nice to have
Additional details
No response
The text was updated successfully, but these errors were encountered: