Re: [code] [textadept] Using normal buffer as command entry

From: Chris Emerson <c-ta.att.mail.nosreme.org>
Date: Tue, 11 Feb 2014 07:49:19 +0000

Hi

On Tue, Feb 11, 2014 at 07:41:15AM +0100, Robert Gieseke wrote:
> this is an excellent idea! Is your experiment already part of your
> ta-vim module or just unreleased play-around code?

It's already in github (https://github.com/jugglerchris/textadept-vi); look
at vi_entry.lua; however it doesn't't quite work with stock TA out of the
box.

For the GUI:
* I think the '\r' key binding needs to be changed or duplicated to '\n'
* The three places where ui.size[2] is used to calculate view.size need to
be somehow adjusted to give a good size.

For Curses you need split views to work. :-)

To use it, first call
  context = vi_entry.new(prompt, handler, [completer])
to get a context (which stores history), and then context:start() to open the
entry (see use in vi_mode_ex).

> Also, have you seen "Quicknav" [1]? It's a very interesting
> Textredux-based approach that works by creating a copy of a buffer
> and using the first line as a 'command entry', here for searching
> only.

I haven't - I'll take a look, thanks.

Chris

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 11 Feb 2014 - 02:49:19 EST

This archive was generated by hypermail 2.2.0 : Tue 11 Feb 2014 - 06:26:42 EST