Stop notification from :wn

16 views
Skip to first unread message

cjsmall

unread,
Feb 12, 2021, 1:40:15 PM2/12/21
to vim_use

When I use the  :wn"  command,  before moving to the next file I see a notification like:

"file1" 137L, 5359C [w]
"file2" 137L, 5359C
Press ENTER or type command to continue

Obviously this requires a <CR> to advance to the next file.  Is there a way to suppress this notice and simply move to the next file?  I can write a little macro:

:w^V^M:n^V^M

that does the trick, but this is a pain given that ":wn" already exists.  Suggestions?

Kwezilomso Mhaga

unread,
Feb 12, 2021, 1:54:43 PM2/12/21
to vim...@googlegroups.com

I'm not sure, but I think you could prefix the command with :silent. Have you tried that?

--
--
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 on the web visit https://groups.google.com/d/msgid/vim_use/c44a75f6-9ac9-475b-a0cf-37c17f3c2411n%40googlegroups.com.
-- 
Regards,
Kwezi Mhaga
OpenPGP_signature

Stan Brown

unread,
Feb 12, 2021, 1:58:29 PM2/12/21
to vim...@googlegroups.com

On 2021-02-12 10:40, cjsmall wrote:
>
> When I use the  :wn"  command,  before moving to the next file I see a
> notification like:
>
> "file1" 137L, 5359C [w]
> "file2" 137L, 5359C
> Press ENTER or type command to continue

Set cmdheight to something larger than 2.

I found this at
:h press-enter

--
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
https://OakRoadSystems.com

cjsmall

unread,
Feb 12, 2021, 6:31:00 PM2/12/21
to vim_use
Thanks to kwezi... who suggested prefixing
"silent" to the command.

:silent wn

does indeed work, but I don't want to have to type
that every time.  Stan Brown's comment to set
cmdheight to two or more also works, but it comes at
the price of permanently losing a full line of editor space.
This is not worth it for the benefit received.  So I guess
I'll just stick with a macro that issues either the
":w^V^M:n^V^M" or ":silent wn" sequence.

Thanks for the replies!

joh...@nacs.net

unread,
Feb 17, 2021, 11:28:19 AM2/17/21
to vim...@googlegroups.com
Another option setting to consider is 'shortmess' which
can shorten message text and affect how messages are
displayed.
Reply all
Reply to author
Forward
0 new messages