Re: how to enclose text

From: <briancsch....at.gmail.com>
Date: Fri, 28 May 2010 10:59:02 -0700 (PDT)

On May 28, 2:35 am, morchel <morc....at.hotmail.com> wrote:
> Hi,
>
> How is enclosing text supposed to work? The shortcuts
> defined in key_commands seem to not show any effect.
>
> Regards,
> Martin

You can also do something like this, which allows you to enclose the
selection in more than one character at a time by using multiple
cursors:

function encloseIn()
        buffer:begin_undo_action()
        local text = buffer:get_sel_text()
        local start = buffer.selection_start
        buffer:set_selection(start + #text, start + #text)
        buffer:add_selection(start, start)
        buffer:end_undo_action()
end
Received on Fri 28 May 2010 - 13:59:02 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:46:30 EST