Replace tabs with spaces in vim

前端 未结 11 1040
青春惊慌失措
青春惊慌失措 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:08

    IIRC, something like:

    set tabstop=2 shiftwidth=2 expandtab
    

    should do the trick. If you already have tabs, then follow it up with a nice global RE to replace them with double spaces.

提交回复
热议问题