Tuesday, October 9, 2012

Re: Commandmode autocomplete

On 09/10/12 23:45, bilibop project wrote:
> Hi,
>
>> When doing ":e /var/<tab>", Vim will pause for input after the first match, eg. "/var/X11/".
>> Further presses of tab will scroll through the other directories under /var. In order to go
>> through the files under /var/X11, however, one could have, at the point of ":e /var/X11/":
>>
>> * Type '/' and then tab, resulting in ":e /var/X11//<first file>".
>>
>> or
>>
>> * Type <ctrl-d><tab>.
>>
>> The latter results in a tidier command line because it doesn't show a double forward-slash,
>> but a messier main window, because all /var/X11's files are listed.
>>
>> I know having a double forward-slash is a minor thing, but it makes me feel that there's
>> another keypress I don't know about, that tells Vim to start looking in this directory
>> -- is there?
>
> Yes it is: any of the the right arrow or down arrow keys
> But I didn't know the hint with <ctrl-d>. Nice.
>
> good night
> quidame
>

Not "any of". Here at least, Right-arrow works like Tab with 'wildmenu'
on, or does nothing with 'wildmenu' off.

:e /var/<Tab>
→ :e /var/X11R6/
→ :e /var/adm/
→ :e /var/cache/
→ :e /var/crash/
→ :e /var/db/
→ :e /var/games/
↓ :e /var/games/atc_score
→ :e /var/games/battlestar.log
→ :e /var/games/cfscores
→ :e /var/games/criblog
→ :e /var/games/emacs/
↓ :e /var/games/emacs/snake-scores
→ :e /var/games/emacs/tetris-scores
↑ :e /var/
→ :e /var/X11R6/

The details may depend on your settings for 'wildmode' 'wildmenu' and
'wildchar'. I use
:set wildmenu wildmode=longest:full,full


Best regards,
Tony.
--
Etymology, n.:
Some early etymological scholars came up with derivations that
were hard for the public to believe. The term "etymology" was formed
from the Latin "etus" ("eaten"), the root "mal" ("bad"), and "logy"
("study of"). It meant "the study of things that are hard to swallow."
-- Mike Kellen

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment