Re: [textadept] scite api conversion

From: mitchell <c....at.caladbolg.net>
Date: Wed, 8 Dec 2010 09:30:08 -0500 (Eastern Standard Time)

Hi Scott,

> I'm converting my Scite tweaks to TA now and the API is largely
> similar, which is making things pretty easy.
>
> I've got a couple of Scite-isms that I can't figure out though. Can
> anyone help me with:
>
> editor:remove(x, y) -- this deletes the text from pos x to pos y

buffer:set_sel(x, y)
buffer:replace_sel('')

> editor.LineEndPosition[i] -- this returns the pos at the end of line i

buffer.line_end_position[i] should work; did you experience a problem with
it?

> I guess I should ask if TA has any block indent or unindent functions
> already, since Scite doesn't, and that's what I'm converting.

buffer:tab() and buffer:back_tab()

>
> Also, I bind these to C-, and C-. respectively. Is this correct:
>
> keys['c,'] = { indent_left }
> keys['c.'] = { indent_right }

keys['c,'] = { tab, 'buffer' }
keys['c.'] = { back_tab, 'buffer' }

mitchell
Received on Wed 08 Dec 2010 - 09:30:08 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:55:42 EST