textadept icon indicating copy to clipboard operation
textadept copied to clipboard

Menu (feature request)

Open marco-trovato opened this issue 2 years ago • 5 comments

This is currently the only text editor for terminal with CUA standard keybindings that supports text selection, mouse, and ESPECIALLY text folding/collapsing (it's literally the only one with this feature).

Tilde, Micro, and NiceEditor are missing these features.

Can you please...please🙏 add a menu? Even just with File -> Open / Save / Quit Thank you

marco-trovato avatar Aug 08 '23 23:08 marco-trovato

I agree this would be nice to have. Thanks for the reminder. While CDK (the terminal widget toolkit Textadept uses) supports menu widgets, I don't think it has a menu bar or support for nested submenus. Writing those widgets would be difficult for me, so that's why the terminal version of Textadept doesn't have menus :(

The "Tools > Select Command" (Ctrl+P) dialog helps alleviate this to an extent though.

orbitalquark avatar Aug 09 '23 16:08 orbitalquark

Honest question: is it really that difficult to

  1. Without even saving the text buffer currently on the screen, just violently print withut grace on the top of the screen "FILE" with "SAVE, LOAD and QUIT" below
  2. Wait for the right hotkey and call the relative function
  3. Just redraw/refresh the screen to show the editor to return to the working file

?

I ask because it sounds like 10 lines of C code to my experience and it would make a huge difference in term of usability and initial learning curve.

(instead of hardcoding the menu it could be even easily possibile to use an external file which binds a new item of the menu to the relative function)

marco-trovato avatar Aug 11 '23 11:08 marco-trovato

It might not be difficult to do, but it is a hard-coded, half-baked, inflexible solution that defeats the purpose of Textadept. Using an external file adds an additional layer of complexity (and failure point) that would likely not be worth it.

Ctrl+P for now is the way to go through Textadept's menu in the terminal.

orbitalquark avatar Aug 11 '23 18:08 orbitalquark

You are 100% right I didn't know about CTRL-P. I have only one simple legit question: why in the holy cult of the dead cow did you chose CTRL-P instead of ESC ? This menu would have been perfect if I only knew it existed

marco-trovato avatar Aug 12 '23 00:08 marco-trovato

Textadept's keybindings were designed to be as consistent and predictable as possible across all platforms, including the terminal version. Escape cancels autocompletion, calltips, snippets, find/replace, etc. Having it show the command entry would not fit in.

orbitalquark avatar Aug 12 '23 17:08 orbitalquark