Friday, May 25, 2012

RE: silent background execute program cause Vim screen text disappear.

stardiviner wrote:
> I write a function like this in .vimrc:
>
> function! VimwikiWeblinkHandler(weblink)
> let browser = 'firefox'
> execute 'silent !"'.browser.'" ' . shellescape(a:weblink, 1)
> endfunction
>
> When I press "Enter" on the link. It will use browser firefox
> to open it.
> But the Vim screen's text will disappear.

In Linux, you need to append '&'.
Try adding the following after the shellescape():
. '&'

John

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