 |
|
| Computers Forum Index » Computer - Editors » [vim] How to split stderr from stdout on filter... |
|
Page 1 of 1 |
|
| Author |
Message |
| Kenny McCormack... |
Posted: Wed Aug 26, 2009 12:47 pm |
|
|
|
Guest
|
(I'm using GVIM under Windows, in case it matters)
When I filter the buffer through an external command (1G!G...), I get
both the stdout and stderr returned to the buffer. Normally, this is a
good thing, since well behaved commands put nothing on stderr if there
is no error (and if there is an error, you want to see the errors in VIM)
But some commands put out status info on stderr even if everything is fine.
Now, I can, of course, fix this by doing something like "2> nul", and
that would be an acceptable kludge, but, ideally, I'd like to see the
stderr output in a separate buffer.
Is there some, reasonably simple way to do this?
Note: I see now that I could do "2> somefile.tmp" and have
"somefile.tmp" open in VIM (with autoread on), but it'd be nice if there
was a slicker (more "built-in") way to do this. |
|
|
| Back to top |
|
|
|
| Christian Brabandt... |
Posted: Thu Sep 24, 2009 11:44 pm |
|
|
|
Guest
|
On 2009-08-26, Kenny McCormack <gazelle at (no spam) shell.xmission.com> wrote:
Quote: When I filter the buffer through an external command (1G!G...), I get
both the stdout and stderr returned to the buffer. Normally, this is a
good thing, since well behaved commands put nothing on stderr if there
is no error (and if there is an error, you want to see the errors in VIM)
But some commands put out status info on stderr even if everything is fine.
Now, I can, of course, fix this by doing something like "2> nul", and
that would be an acceptable kludge, but, ideally, I'd like to see the
stderr output in a separate buffer.
Is there some, reasonably simple way to do this?
:h 'srr'
e.g.
set srr=>
regards,
Christian
--
"Hit any key to continue" does _not_ mean you should hit the power switch. |
|
|
| Back to top |
|
|
|
| Kenny McCormack... |
Posted: Sat Sep 26, 2009 2:52 pm |
|
|
|
Guest
|
In article <4abca828$0$30234$9b4e6d93 at (no spam) newsspool1.arcor-online.net>,
Christian Brabandt <cb at (no spam) 256bit.org> wrote:
....
Quote: Well, I believe with this setting and a shell set to cmd.exe it should
work (at least that's what my small test case shows):
2>&1\ >%s\|start\ /b\ gvim\ -f\ -\ &
I ended up with this, which seems to work fine. Thanks for your help!
set srr=2>&1\ >%s\|start\ /b\ gvim\ -c\ \"set\ nomod\"\ - |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Tue Dec 01, 2009 1:04 pm
|
|