autocomplete-ALL-the-things
autocomplete-ALL-the-things copied to clipboard
Previews in overlay
Right now, when the user is cycling through the possible completions, each one is pasted into the terminal after backspace-ing the previous one. It's not very elegant solution. I consider replacing (probably as an option) this approach with an overlay overshadowing the actual text and pasting the text only once.
Proof of concept patch here: https://gist.github.com/Vifon/48d76bd66a2cc983b744
Ah, finally I understand issue... Can you please push edits to dev branch, so I can pull and test it?
I'd rather not. This code is a mess. It's just enough for it to work. Just download the patch and apply it to the current master.
Please, let me know what you think about it.
I've found following issues: cursor is missing after overlay (is it even possible in urxvt to set cursor position? can we send escape codes from plugin?) and backspace key works incorrectly.
I think that best way to solve issue will be try to mimic normal text on terminal, so user can not tell that it is actual overlay.
BTW, it is better to use dev branch, because of it's easier to pull and propose changes. You can always amend commits and even delete dev branch, so it's actually doesn't matter how messy code is...
Yeah, I know. It's only a proof of concept to show you exactly what I've been talking about.
That's my intention to mimic the normal text style. :)
If it was even a little more than a throwaway code, I'd do this. But I think writing it from scratch would be better.
Anyway, do you think it is an issue at all, or should we just leave it as it is now? I'm still sitting on the fence. Simplicity may suffer and it was not a real usability issue for the whole time I've been using it.
I understand that inserting and backspacing text is not a good way to cycle through completion variants, but I didn't found any actual problem with this solution yet. So, maybe this should be frozen until real problem arises?
Proposed solution harder to implement and has corner cases to which I can't imagine solution (e.g. multiline completion in curses applications, where beginning of the line is located at column 0, like in vim).
Seems reasonable. That's what I was thinking too.