Friday, January 20, 2012

Re: Retrieve the argument of a prior Ex mode command

On Fri, Jan 20, 2012 at 02:20:37AM EST, Paul Isambert wrote:
> Chris Jones <cjns1989@gmail.com> a écrit:

[..]

> That's because you forgot to retrieve the command typed so far.

| let l:head = matchstr(getcmdline(), '^\S*')
| let l:cmdl = ""
| ...
| return l:head . " " . l:cmdl

Clever.

With this addition & testing for sanity aspects to make it a bit more
robust, I should be able to wrap it up at the weekend.

Thanks, this was fun..!

CJ


--
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: