Vim indent xml file

后端 未结 9 1785
北恋
北恋 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:26

    A simple solution that I like which doesn't require any 3rd party tool is to insert a newline before each opening tag '<...>'. Then you can use standard vim auto-indentation. In short:

    1. %s/
    2. gg=G to auto indent

提交回复
热议问题