I'm using Ubuntu Linux to develop on, and when I type the \da command while my cursor is on a drupal command, the command opens the drupal API documentation URL correctly-- However, the command also overwrites my vim buffer with the phrase, "Created new window in existing browser session." I'm guessing this is the standard output from the "open" command.
This seems like a vim specific issue, not drupal, so I asked about it on stackoverflow, and received the following reply:
http://stackoverflow.com/questions/9639713/how-to-redirect-standard-outp...
One of the suggestions fixed the issue for me. The suggestion was to replace the calls to
execute '!' .<...> with call system( <...> ). This change will discard any stdout returned by the call to open.
Thanks,
Bart
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | vimrc-fix_open_url_output-1477728-2.patch | 1.06 KB | bartlantz |
Comments
Comment #1
bartlantz commentedHere's a patch that fixed the issue for me.
Thanks,
Bart
Comment #2
alanmackenzie commentedI can't replicate this on Ubuntu 12.04 with vim.gnome or vim.basic.
Can you try with nothing but the drupal vim bundle installed?
Comment #3
bartlantz commentedHey Alan,
yeah, I'm using Ubuntu 12.04 as well now and I can't reproduce this anymore either. Although it seems strange that update would've changed anything. Also the issue occurred when running vim from a terminal, not gvim.
I want to say that perhaps it was occurring when I was ssh'd into a server and using screen, but I can't get \da to open a browser at all that way now. So I guess this should be closed with a can't reproduce.
Thanks for looking in to it,
Bart
Comment #4
benjifisherEven if you are having trouble reproducing the bug, the change from
:executeto:call system()is a good idea. I included it in the patch in #1457276-4: Substitue filename for 'hook' in functions looked up on api.drupal.org.