Feature proposal: TUI drop-down menus
Micro, in my opinion, is probably the best TUI editor for beginners. It, however, lacks one very useful feature that was present in mc, mcedit and some other apps and does help beginners a lot: drop-down menus.
mcedit example:
In edit editor:
Inspired by these designs I propose to implement similar functional. Drop-down (or up?) menus can be incorporated right to existing information entries.
Some design concepts:
Shortcuts were taken from here: https://gist.github.com/rochacbruno/9e4f4c471e849276f11562272db446b0
Half-width blocks can be used to make borders wider
Or add shadows:
Color inversion can be used to highlight the currently selected tab
Box-drawing characters can be used instead of vertical bars for better looks. I also added spaces before beginning and end of lines (I wonder why they weren’t there to begin with)
One more variant with grey highlighting color:
Hierarchical dropdown menus are rather clunky to navigate without a mouse but something a bit simpler such as showing a list of available filetypes when the "ft:unknown" is clicked would be a nice touch. I'm not sure how the implementation would work though considering the statusline string is completely customizable through statusformatl and statusformatr settings.
This is a bit ambitious for now I think (especially making the statusline interactive, for reasons explained by @Andriamanitra). However, I also think that providing a plugin API for drawing on top of the buffers might not be too crazy of an idea.
I have implemented something experimental in that vein in my personal fork (although I have only done a couple things with it), so I have an idea of how it could be done -- the problem is that, at this point, it is wiser to lessen the maintenance burden on micro, so I am hesitant to start work on this.
Also, I wouldn't want to push for this without blessing from the maintainers and the wider community. Are features like this even something we want to complicate micro with?
Hierarchical dropdown menus are rather clunky to navigate without a mouse
On the contrary, they're comparatively awkward to navigate with a mouse. :-) Also note the highlighted letters in mcedit/edit.com. Doing something like Alt+w(indow), n(ext) is much nicer than doing something like Ctrl+>, which not only requires an awkward Ctrl+Shift but probably conflicts with your terminal emulator anyway. That's also how tmux works, except without the built-in documentation provided by the menu.
Are features like this even something we want to complicate micro with?
As just a user, I came here because the new https://github.com/microsoft/edit is great in this one specific manner.
Anyway, sorry for the intrusion. I figure if the authors agreed with me it'd have been long since implemented already. ;-)
Actually, overlay plugins are currently in the works (draft PR #3733), so menus like these are not out of the question! :)
I found myself really missing some kind of menu functionality, so I experimented a bit this afternoon and put together a quick proof of concept.
While it's still very rough, I'm quite happy with how it turned out:
https://github.com/hopiu/micro
Here's a screenshot for reference