Friday, May 25, 2012

silent background execute program cause Vim screen text disappear.

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.
I made a screenshot of this. It is in attachment.
--
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone}
IRC(freeenode): stardiviner \\ Twitter: @numbchild \\
GnuPG Key fingerprint
>>> 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433

No comments:

Post a Comment