views:

68

answers:

1

I now have a solution to this question, which leads me to the next question: how 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)

+2  A: 

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

zipcodeman
`autocmd BufReadPost,FileReadPost *.xml silent %!xmllint --noent - 2> /dev/null` did the trick, Thank-you!
Kimvais
Glad I could help!
zipcodeman