Monday, March 26, 2012

Re: Update Vim after it suspended?

On Mon, 26 Mar 2012, Tim Chase wrote:

> I'd just create a mapping something like
>
> : nnoremap <f4> :suspend<bar>echo 'Doing something after

Amazing, this seems to work. The ``something after'' does seem to execute
after vim reanimates when put back in the forground. So it acts like an
autocommand triggered by the event of un-suspending vim.

So I can do this:

:noremap ^Z :suspend<bar>rviminfo<CR>

for example, and vim will update itself with all the latest information in
viminfo, put there after it was put to sleep. Great solution. This solves
a query in the past from someone who wanted to go in and out of vim instances,
via suspend and forground -- and yet cut and paste, retain marks etc.

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