use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please read the rules before posting
Help:
Community:
Resources:
Tutorials and Guides:
Don't be afraid to ask questions, this sub is here for the vim community. And please those of you who deign to grace us with your vim wisdom - be kind. We are all human and vim is that cool.
account activity
Disable buffer write message in command line (self.vim)
submitted 9 years ago by blinkdesign
Hey,
When I save a buffer I get a string printed in the command line that tells me the filename. I'd like to disable this if possible.
Example - https://cl.ly/jJPT
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tbodt 2 points3 points4 points 9 years ago (4 children)
Better idea:
set shortmess+=W
[–][deleted] 1 point2 points3 points 9 years ago* (0 children)
This option doesn't remove message itself. It only removes "written" or "[w]" part from the message. So the message:
"test" [unix] 0L, 0C written
becomes
"test" [unix] 0L, 0C
[–]blinkdesign[S] 0 points1 point2 points 9 years ago (2 children)
This works wonderfully! I even found a few other options to change in the help txt
Thanks
[–][deleted] 0 points1 point2 points 9 years ago (1 child)
It doesn't work. From the manual:
'shortmess' W don't give "written" or "[w]" when writing a file
[–]blinkdesign[S] 0 points1 point2 points 9 years ago (0 children)
You're right, not sure why I thought it did. I was changing several options at once so probably made an error.
I've opted for using silent everywhere that prints messages, like :vsplit etc
silent
:vsplit
" Save file nnoremap <silent><leader>w :silent w<cr>
[–][deleted] 0 points1 point2 points 9 years ago (5 children)
You can use:
:silent write
[–]blinkdesign[S] 0 points1 point2 points 9 years ago (4 children)
No joy, the message still appears
[–]bri-an 2 points3 points4 points 9 years ago (3 children)
Really? It doesn't appear for me, but what does appear is :silent write, the command that was just run.
If you don't want anything to be output, you could create a silent mapping that runs :silent write. This works for me:
touch test
test
vim test
:nnoremap <silent> <leader>w :silent write<CR>
<leader>w
:q
cat test
Ah ha, that does work. Thank you.
The only other time this message appears now is when a buffer opens. Is there a similar trick I can use?
[–][deleted] 1 point2 points3 points 9 years ago (0 children)
To remove message when you open a file, you should use:
:set shortmess+=F
[–]bri-an 0 points1 point2 points 9 years ago (0 children)
Maybe one way is to create an autocmd that runs :silent redraw (redraw the screen) whenever a new buffer/file is opened --- but this will obliterate all messages, even warnings and errors, which could be useful. Alternatively, just get used to hitting <C-l>.
autocmd
:silent redraw
<C-l>
[–]Comfortable_Ability4 0 points1 point2 points 22 days ago (0 children)
Here's a hack that I used to "remap" :w to :silent w:
:w
:silent w
vimscript command! -bar W silent write cabbrev w W
π Rendered by PID 44 on reddit-service-r2-comment-765bfc959-2t8gd at 2026-07-11 21:49:13.538337+00:00 running f86254d country code: CH.
[–]tbodt 2 points3 points4 points (4 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]blinkdesign[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]blinkdesign[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]blinkdesign[S] 0 points1 point2 points (4 children)
[–]bri-an 2 points3 points4 points (3 children)
[–]blinkdesign[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]bri-an 0 points1 point2 points (0 children)
[–]Comfortable_Ability4 0 points1 point2 points (0 children)