Re: Key bindings

From: Brian Schott <briancsch....at.gmail.com>
Date: Tue, 02 Feb 2010 18:47:01 -0800

On 02/01/10 09:37, Rob wrote:
>> This problem is certainly worth looking into.
>
> I have sent Mitchell some proposals to change this, that he will look
> into, when he has the time.
> This might require redefining the keyboard short cuts as described
> above. So maybe that's a good time to look at the default short cuts
> (and remove some of the ToDos in key_commands.lua). I personally would
> like to have unified short cuts for all platforms, though I see the
> problem of conforming to all these different standards... But at the
> moment there are some that aren't "right", for example ctrl-q is
> "quit" in most of my Linux application, in the Mac short cuts ctrl-k
> is defined as smart_cutcopy, which in Mac applications is by default
> an Emacs-like delete to end of line.
> So, how have you changed the default keybindings? I like the simpler
> short cuts that some are using for the "enclose in".
> Another problem I had was that the default for "select in" is alt-s
> which is shadowed by the entry for the "search"-menu. I never use
> short cuts for the menu, does anybody do that? If I have to look
> something up in the menu, I use the mouse.
>
> So, please share your key_commands...
>
> - Robert
>

The one thing that really bothers me is that the keyboard shortcut for
"Lua Pattern" in the find pane is grabbed by the menu. I use the pattern
search all the time, and having to reach for the mouse is an efficiency
killer. I suggest changing that accelerator to "Le_xers" so that ALT+X
activates it. (Wait. I can change that in locale.conf. I'm an idiot for
not realizing that before...)

The only menu shortcut I really use is ALT+B for toggling whitespace,
tabs, and end of lines. (Occasionally ALT+F to reload the file from disk)

Here are the notable modifications I've made to my key commands:

keys['s('] = {function() if buffer.get_sel_text() == '' then return
false else m_editing.enclose("parens") end end}
  keys['s"'] = {function() if buffer.get_sel_text() == '' then return
false else m_editing.enclose("dbl_quotes") end end}
  keys['['] = {function() if buffer.get_sel_text() == '' then return
false else m_editing.enclose("brackets") end end}
  keys['s{'] = {function() if buffer.get_sel_text() == '' then return
false else m_editing.enclose("braces") end end}
  keys["'"] = {function() if buffer.get_sel_text() == '' then return
false else m_editing.enclose("sng_quotes") end end}
  keys["s*"] = {function() if buffer.get_sel_text() == '' then return
false else m_editing.enclose("c_comm") end end}
  keys["s+"] = {function() if buffer.get_sel_text() == '' then return
false else m_editing.enclose("d_comm") end end}

keys.cb = { m_bookmarks.toggle }
keys.csb = { m_bookmarks.goto_next }
keys.csab = { m_bookmarks.goto_prev }

keys.cd = { 'line_duplicate', b }
keys.cl = { m_editing.delete_line }
keys['c '] = { m_editing.end_line }

- Brian
Received on Tue 02 Feb 2010 - 21:47:01 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:38:59 EST