Re: Keyboard short cuts

From: mitchell <>
Date: Wed, 17 Mar 2010 12:04:05 -0700 (PDT)


> > Are these keyboard shortcuts in key_commands.lua or somewhere
> > configurable? I noticed that the latest release of Textadept has
> > Control + L coded to "Cut line" (I had previously bound it to "delete
> > line" and have been messing up my clipboard ever since upgrading)
> > - Brian
> >> On Mar 17, 10:39 am, mitchell <> wrote:
> >> [snip]
> >> I have removed side pane support in latest hg and replaced the buffer
> >> browser with a filteredlist dialog as mentioned earlier. It can be
> >> activated with CTRL+B (windows/linux), Apple+B (osx).
> Mitchell,
> 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.

Received on Wed 17 Mar 2010 - 15:04:05 EDT

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