Vim indent xml file

后端 未结 9 1798
北恋
北恋 2020-12-07 08:05

I am learning Vim but I thought this was a simple task but I cannot get it to work. I have browser SO but the solutions are not working for me.

I am trying to correc

9条回答
  •  借酒劲吻你
    2020-12-07 08:18

    In VIM, I auto-indent the whole file (using hard tabs) using the following command:

    :%!XMLLINT_INDENT="^I" xmllint --format -
    

    The ^I is a single character you generate via: CTRL+v,CTRL+i

提交回复
热议问题