Re: Keyboard short cuts

From: Robert <ro....at.web.de>
Date: Sat, 20 Mar 2010 03:54:52 -0700 (PDT)

> > currently one has to copy key_commands.lua to ~/.textadept, change it
> > to your needs and require it in your init.lua.
> > Would it be an option for you to have the default key_commands.lua
> > loaded and then load an additional key_commands.lua in ~/.textadept
> > that can overwrite or add to the default one?
> > A little bit more complexity in Textadept, but less for the user,
> > because no init.lua would be necessary. Additionaly, If I now forget
> > closing some brackets or something when editing my key_commands,
> > resulting in an error I end up with no keyboard short cuts at all.
>
> In your init.lua
>
>   require 'ext/key_commands.lua' -- standard key commands
>
>   local keys = _G.keys
>   keys.cb = nil
>   keys.cB = { textadept.switch_buffer }
>
> I suppose a 'dofile()' could be put at the end of core/ext/
> key_commands.lua for overrides in ~/.textadept. I will consider this.
>
Mitchell,
do your changes to the manual (hg bc68cdf72a) mean that there will be
no dofile option?
I think it would be easier to simply be able to drop a
key_commands.lua in .textadept.
Further, it would be similar to having an additional mime_types.conf,
additional lexers in .textadept.
A file added with dofile could do both adding to the global keys table
as well as completely redefining it, right?

- Robert

- Robert
Received on Sat 20 Mar 2010 - 06:54:52 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:40:27 EST