[code] [Textadept] menu suggestion

From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: Thu, 5 Jan 2017 10:36:03 -0300

Hi Mitchell,

     I tried to replace the menu module with my own version in
    and found that this module is tightly coupled with the keys module,
so this module should also be replaced if you want to roll your own menu.

     I'm referring to code like this:

         {_L['Select to _Matching Brace'], function()
textadept.editing.match_brace('select') end},

         local m_sel = m_edit[_L['_Select']]
         keys[GUI and 'cM' or 'mM'] = m_sel[_L['Select to _Matching

     Using their own functions, like in:
        {_L['_Highlight Word'], textadept.editing.highlight_word},
        keys[not OSX and 'caH' or 'mH'] = textadept.editing.highlight_word

     Is much cleaner, decoupled and easy to call this commands from
scripts (after all, they have a menu and an accelerator, so they are
really useful commands).

     There are near 70 functions in this situation....

     Just my two cents.

     Best wishes,

You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 05 Jan 2017 - 08:36:03 EST

This archive was generated by hypermail 2.2.0 : Fri 06 Jan 2017 - 06:37:12 EST