randy3k / AlignTab

An alignment plugin for Sublime Text using regular expression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace Input by InputHandler

deathaxe opened this issue · comments

The latest release of ST supports InputHandlers to pass arguments to commands.

How about using a ListInputHandler in align_tab command to directly list the history and the named patterns? This way the align pattern could directly be entered in the Command Palette with all the most important/recent ones by hand.

The currently used view.show_input() to enter the pattern could either be removed or used for backward compatibility if InputHandlers are not supported.

sounds like a good idea. With that said, I don’t think i am going to spend time on this one. (to be honest, I hv never read the doc for InputHandler and have never known how it works)

Seems not to be too difficult. Already played around with it a bit. Maybe prepare a PR.

one potential problem though is that the InputHandler may block the view when the preview mode is on.

You mean it hides the part of the content, which is to be aligned? This is what I realized while prototyping.

Ya, it’s what I meant.

Even though the InputHandlers can improve the workflow, the disadvantage of hiding the view partly causes them to not being suitable for that use case.