Re: Key Command Reference?

From: Vais Salikhov <vsalik....at.gmail.com>
Date: Mon, 23 Mar 2009 12:02:08 -0400

Hello, James,

If you are looking for a Lua-friendly editor, I think you found one ;)
Scite is a great editor that uses Lua as an extension language, but in
TA Lua is front and center - it is not just an extension language, but
the implementation language for all editor functionality.

I agree with your ideas regarding some sort of training wheels to be
available in TA. It is just a matter of someone (hint hint) creating
an alternative, "training wheels" menu config that exposes all
available functionality (to the extent that such a thing is possible
given the dynamic nature of many commands). The luadoc for TA is very
extensive and will tech you everything you need to know.

What you probably want to do for your project is create a customized
"distro" of TA with only the functionality required for the user to
make it simple and underwhelming to use.

Vais

On Mar 23, 2009, at 11:16 AM, James Snyder <jbsny....at.gmail.com> wrote:

>
> I had found key_commands.lua and had gotten the basic key commands.
> Thanks for the tip on how those definitions translate.
>
> There is the reason, though, aside from personal programming that
> makes this editor interesting, and that is as a possible IDE for an
> embedded Lua platform I've recently been contributing to:
> http://www.eluaproject.net/ Essentially the project runs full Lua on
> embedded microcontrollers allowing the user to have access to a live
> interpreter while working with the serial, analog-to-digital, general
> purpose IO, etc.. peripherals on the device.
> (a new release is coming out shortly, and the docs will be much more
> complete at that stage)
>
> The original author has been thinking about using SciTE as the basis
> for an IDE, but while looking around I found Textadept, which is even
> more Lua-friendly since much of it is written in Lua. Why I'm
> mentioning the key bindings thing is that it would be nice to have the
> editor be not only power-user friendly, but also friendly to more
> novice users or ones just familiar with figuring out key bindings
> through menus. Since it is all controlled by lua, it seems like all of
> this could be customized fairly easily.
>
> I don't know what the project goals are for Textadept, and so I don't
> presume to know what the developers do or don't want the editor to
> behave like. It does, however, seem like it would be uniquely
> friendly for talking to and working with a device that is running Lua
> exclusively.
>
> Meanwhile, I'm also giving it a go for a bit as a primary editor :-)
>
> Thanks for the help and comments.
>
> -jsnyder
>
> On Mar 23, 7:28 am, Alex <alex.bep....at.gmail.com> wrote:
>> James,
>>
>> have you already looked at the file core/ext/key_commands.lua in the
>> Textadept directory? I find it very readable. So much so that I think
>> any other reference would be a waste of time.
>>
>> Some things to be aware of:
>> * keys.css stands for Ctrl+Shift+S
>> * The command
>> { 'goto_buffer', v, 1, false }
>> means that
>> view:goto_buffer(1, false)
>> is invoked when the key combination is pressed. Other commands for
>> the
>> current view and the current buffer are defined in a similar way.
>>
>> - Alex
>>
>> On Mar 23, 6:52 am, James Snyder <jbsny....at.gmail.com> wrote:
>>
>>
>>
>>> On Mar 22, 7:31 pm, mitchell <mforal.n....at.gmail.com> wrote:
>>
>>>> Hi James,
>>
>>>>> I have a few questions/comments based on using the editor for a
>>>>> short
>>>>> period of time:
>>>>> 1. Is there a built-in way to list key combinations associated
>>>>> with
>>>>> menu commands along with the menu commands?
>>
>>>> You could modify core/locale.lua for menu items and add key
>>>> shortcuts,
>>>> but there is no automated way to do this. I thought about adding
>>>> menu
>>>> accelerators, but since key commands are dynamic (and chained),
>>>> that
>>>> would not work well at all.
>>
>>> OK, this is what I figured. Regarding the latter part, presumably
>>> since the menus and the bindings are dynamic it should be possible
>>> to
>>> to update the binding listings in the menus if necessary? Regarding
>>> chaining, I'm not suggesting that they'd really need to be
>>> registered
>>> as accelerators through the GTK menuing system, I'm considering them
>>> more as a reference.
>>
>>>>> 2. Is there a way to generate a quick-reference for commands
>>>>> defined?
>>
>>>> I'm not sure what you mean by commands. Every Lua function is
>>>> documented in LuaDoc, but 'core/ext/menu.lua's 'actions' table uses
>>>> pretty much every module-level function available; that might be a
>>>> good place to look.
>>
>>> Sorry, I wasn't clear, this was an extension of the first
>>> question, I
>>> meant key commands when I just said commands.
>>
>>> Thanks for the answers :-)
>>
>>>> Hopefully that helps,
>>>> -Mitchell;
> >
Received on Mon 23 Mar 2009 - 12:02:08 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:37:43 EST