Re: [code] [textadept] How to call menu commands from the command entry?

From: Mitchell <>
Date: Sun, 2 Dec 2012 12:55:27 -0500 (EST)

Hi Richard,

On Sun, 2 Dec 2012, Richard Spindler wrote:

> Hi,
> I was trying to call functions from the menu and that are bound to keyboard
> commands from the textadept command line. I took a peek at the keybindings
> lua file for some inspiration.
> For example, I tried typing:
> utils.toggle_property, 'wrap_mode'
> but this did not work out, I ended up with an error message. :-(
> How would I go about calling such commands?

You call commands as you would call Lua functions. In your case you would


However, if you look at the toggle_property function, you can imitate its
behavior much more simply:

     buffer.wrap_mode = 1 -- or 0 to turn it back off

or even

     wrap_mode = 1 -- or 0 to turn it back off

I hope that helps,

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sun 02 Dec 2012 - 12:55:27 EST

This archive was generated by hypermail 2.2.0 : Mon 03 Dec 2012 - 06:48:33 EST