Monday, March 26, 2012

Re: Update Vim after it suspended?

On 03/26/12 10:24, howard Schwartz wrote:
> Let's say i suspend an instance of vim with ctrl-Z or :suspend
> Is there any way to use autocommands to update vim when I restart it with
> fg on the command line?

I'd just create a mapping something like

:nnoremap <f4> :suspend<bar>echo 'Doing something after
'.strftime('%c')


Then, suspend using F4 (one could create a similar ":command"
version if you wanted to do it from the command-line, even
mapping the normal-mode version to that new command).

From my testing (Linux + rxvt + bash + Vim7.2) the strftime()
shows that the stuff after the bar triggers after control returns
to Vim (rather than executing it concurrently).

-tim


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