Replace tabs with spaces in vim

前端 未结 11 1051
青春惊慌失措
青春惊慌失措 2020-12-02 03:38

I would like to convert tab to spaces in gVim. I added the following line to my _vimrc:

set tabstop=2

It works to stop at two

11条回答
  •  生来不讨喜
    2020-12-02 04:09

    Once you've got expandtab on as per the other answers, the extremely convenient way to convert existing files according to your new settings is:

    :retab
    

    It will work on the current buffer.

提交回复
热议问题