Tabs and spaces in vim

前端 未结 6 1133
生来不讨喜
生来不讨喜 2021-01-29 18:07

How do I prevent vim from replacing spaces with tabs when autoindent is on?

An example: if I have two tabs and 7 spaces in the beginning of the line, and tabstop=3

6条回答
  •  日久生厌
    2021-01-29 18:39

    You can convert all TAB to SPACE

    :set et
    :ret!
    

    or convert all SPACE to TAB

    :set et!
    :ret!
    

提交回复
热议问题