Vim formatting using gg=G with xml

前端 未结 2 2000
心在旅途
心在旅途 2021-02-05 22:24

I have a correctly formatted xml file, and following the command given as an answer here:

How can I autoformat/indent C code in vim?

I am trying to auto indent

2条回答
  •  感动是毒
    2021-02-05 23:10

    Try typing: :set equalprg?. If it says equalprg= it means that you do not have a program set for xml indentation, so it's probably doing some dumb default action. Here's a guide for setting xmllint as your formatter: http://ku1ik.com/2011/09/08/formatting-xml-in-vim-with-indent-command.html

提交回复
热议问题