[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] dropdown control in buffer

From: Thomas Dickey
Subject: Re: [vile] dropdown control in buffer
Date: Wed, 08 Feb 2012 20:29:34 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Feb 08, 2012 at 11:41:04PM +0100, ben wrote:
> just to understand you right, are talking about viles minibuffer? Interesting 
> idea. I think it would interesting to know if it possible to:

The ":"-line is vile's minibuffer.  Actually minibuffer wasn't (what I
recall) a given name in the early 1990s (though Paul may recall better).
It was a special-purpose chunk of code, that I improved to make it
associated with a "real" buffer and window, though they're still more
than half special-cases.

The [Completions] buffer is distinct from that.

> 1.  invoke the minibuffer with a typical autocompletion key sequence say
> 'ctrl-space'.
> 2.  then the minibuffer is populated dynamically, with results coming from a
> computation based on the context of the cursors position in the main buffer
> 3.  with 'enter' an item from the minibuffer is choosen and appended right
> after the said cursor
> is this (theoretically) possible?

It sounds as if we're still mixing the minibuffer and [Completions].
In emacs (so I recall reading), the minibuffer is more general-purpose,
and can dynamically grow/shrink.  vile's minibuffer has "always" been
a single row (like vi's ex command-line), and vile displays results into
_other_ buffers (such as [Completions]).  Those include what I term
the "animated" buffers, such as [Binding List], but also buffers created
by macros such as [Which Files], created by something like

        2:which-exec vile

(the repeat count makes the macro generate a window).  Since a macro
can be bound to a key, then it's possible to make macros that show
some state at the cursor position, as well as other macros that take
some text from other buffers.

If you want to have that state update as the cursor moves around -
that's cumbersome (you'd have to setup the macro(s) to rebind the
keys used for cursor movement).  That's because there's no hook that
fires on keystrokes.

A while back I used xedit, which did have that ability (to have a macro
control the reader).  xedit used a macro to display a help menu - you
could move the cursor to a keyword, and press enter (or some function-key),
and open the help for that topic.  But the help-menu was readonly; you
could only use it for getting into the help-system.

> Thomas Dickey wrote:
>> On Wed, Feb 08, 2012 at 06:31:37PM +0100, ben wrote:
>>> hi
>>> Is it possible to open a something like a dropdown control inside viles
>>> main buffer? Similar to what vim provides for all kinds of completion
>>> tasks.
>> That's a question with more than one part.  While I'm aware that there's
>> an add-on (cream, which was inspired so to say by the menuing package
>> that John Davis wrote for jed) which provides menus - your comment about
>> "dropdown control" sounds as if you're referring to that, vim "normally"
>> provides a simpler sort of completion (cycling through possibilities on
>> the ":" line).
>> vile has built-in a different type of completion on the ":"-line,
>> which is normally activated by a repeated tab character.  That tells
>> it to show a buffer listing the possible completions - for filenames,
>> command-names, tags, variables.  (There is also a simpler scheme which
>> works all on the ":"-line.
>> It's described in the help file, in particular this section:
>> Completion

> _______________________________________________
> vile mailing list
> address@hidden

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]