Filtering and stderr

17 views
Skip to first unread message

BPJ

unread,
Nov 10, 2025, 12:16:43 PM (2 days ago) Nov 10
to vim_use
Can I get stderr directed to another file or buffer with `:!` (other than using shell redirects)? I'm sure there is an option but I can't find it! :-)

/bpj

Eric Marceau

unread,
Nov 10, 2025, 5:06:01 PM (2 days ago) Nov 10
to vim...@googlegroups.com

Regrettably, the short answer is no.


On 2025-11-10 12:16, BPJ wrote:
Can I get stderr directed to another file or buffer with `:!` (other than using shell redirects)? I'm sure there is an option but I can't find it! :-)

/bpj

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CADAJKhC1oJcpONmCfq4wAUP_otVTskw%2B_9Wk%2BQR-S1-bFq%2B2pg%40mail.gmail.com.

Riza Dindir

unread,
Nov 11, 2025, 2:27:05 AM (yesterday) Nov 11
to vim...@googlegroups.com
Hello

The ! is the shell escape. It will be using the shell, and redirecting can be done via shell redirects.

You can write a wrapper script that might take a file (or not) that will generate the file you want. In that shell script you might use shell redirects.

Or write/rewrite the utility that you will be using with !. That will create a file using stderr.

If you want to redirect to a buffer you can use the above again. But you might need to write a vim function, command and/or define mappings, based on your requirements.

Regards


On Mon, Nov 10, 2025, 20:16 BPJ <b...@melroch.se> wrote:
Can I get stderr directed to another file or buffer with `:!` (other than using shell redirects)? I'm sure there is an option but I can't find it! :-)

/bpj

Reply all
Reply to author
Forward
0 new messages