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
I'm unsure what to call this so bare with me. The reason I'm posting is if there's already a better way of doing this (and I just missed it), or if there's any interest in either adding as additional recipe, or implementing this behavior (I wouldn't mind giving it a shot).
I wrote a tiny custom command to allow using one key (<Tab>) for the following:
Press once to insert ghost text without menu
Press again to cancel (remove insert) and open the menu to allow fuzzy search
This way I have instantaneous and minimalistic tab completion akin to a terminal, but I can still use the menu/fuzzy search if I need to, all on the same key. In my case I also use the same key for select_next, and <S-Tab> for select_prev while the menu is open.
The command
localfunctioninsert_ghost(cmp)
ifcmp.is_menu_visible() thenreturnend-- Remove ghosted insert and show menuifcmp.get_selected_item_idx() ~=nilthencmp.cancel()
returncmp.show()
end-- Insert ghost textifcmp.is_ghost_text_visible() thenreturncmp.select_next({ on_ghost_text=true, auto_insert=true })
endend
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm unsure what to call this so bare with me. The reason I'm posting is if there's already a better way of doing this (and I just missed it), or if there's any interest in either adding as additional recipe, or implementing this behavior (I wouldn't mind giving it a shot).
I wrote a tiny custom command to allow using one key (
<Tab>) for the following:This way I have instantaneous and minimalistic tab completion akin to a terminal, but I can still use the menu/fuzzy search if I need to, all on the same key. In my case I also use the same key for
select_next, and<S-Tab>forselect_prevwhile the menu is open.The command
Relevant config
Beta Was this translation helpful? Give feedback.
All reactions