Re: [code] [textadept] Proporsal: sam command language plugin

From: Robert <>
Date: Mon, 15 Jul 2013 13:19:31 +0200


Am 7/15/13 12:48 PM, schrieb suharik:
> I want to implement analogue of sam command language for textadept text
> editor.
> Some benefits it could give:
> - Structural regular expressions (for example, `,x/=.*$/s/ +/ /g`
> removes duplicated spaces in every line after '=' symbol)
> - Parallel commands (for example, you can replace every 'vi' by 'emacs'
> and every 'emacs' by 'vi')
> - Working with multiple files, advanced pipeline I/O and a lot or other
> features. This is a very powerful thing.
> - Finally, you can file/replace without annoying find/replace form
> But I have some questions about API. How to create a text field for
> commands?

have a look at the `command_entry` module[1].
It's used in the `find_incremental` and `filter_through` functionality
for example, you can find more in Textadept's source files editing.lua
and keys.lua [2,3].
Basically, you have a special key mode that is active, when the command
entry is open and a function to be called on enter which implements your
desired Sam functionality.

This looks very interesting, looking forward to it.



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Mon 15 Jul 2013 - 07:19:31 EDT

This archive was generated by hypermail 2.2.0 : Tue 16 Jul 2013 - 06:36:18 EDT