Re: [code] Command Entry Line: Editable "macros"

From: Mitchell <>
Date: Tue, 18 Feb 2020 21:43:24 -0500 (EST)

Hi Gavin,

On Mon, 17 Feb 2020, Gavin Holt wrote:

> Hi,
> I really like the command entry line, especially for Lua with syntax
> highlighting. Inspired by TECO[1] I have written some code to
> facilitate editable "macros" (attached as stringext.lua).
> [snip]

Cool! Thanks for sharing.

> I would be very grateful for some help extending the textadept command
> entry line module to maximise the utility of these macros:
> Q1. Keyboard function to "repeat last macro": I can't find where the
> last command line is stored

It's not. You can get the current text via `ui.command_entry:get_text()`. Does that help at all?

> Q2. History for the command entry line.

For this I would recommend creating a new mode that saves history as commands are run and has keybindings that cycle through history. You can copy the code from *modules/textadept/command_entry.lua* that runs Lua.

> Q3. Snippets for the command entry line.

This is likely not possible. The command entry wasn't designed to be a full-fledged buffer, but just a place for quick one-off commands.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 18 Feb 2020 - 21:43:24 EST

This archive was generated by hypermail 2.2.0 : Wed 19 Feb 2020 - 06:25:35 EST