I now have a solution to this question, which leads me to the next question: ho开发者_开发知识库w do I run "xmllint --noent" to all .xml files when opening them in vim.
I have an example to do --decrypt on load and --encrypt on save for .gpg in my .vimrc, but it is so complicated that I cannot really figure the relevant parts. My latest attempt is:
autocmd BufReadPost,FileReadPost *.xml %!xmllint --noent - 2> /dev/null
which gives me :
<N> lines filtered
Press ENTER or type command to continue
How do I get rid of this? (i.e. do it silently)
I think this question might belong on superuser, but if you want to execute a command with no output, you can use silent
I.E.
:silent !echo Hello
see: Avoiding the "Hit ENTER to continue" prompts
精彩评论