Replace tabs with spaces in vim

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

    If you want to keep your \t equal to 8 spaces then consider setting:

       set softtabstop=2 tabstop=8 shiftwidth=2
    

    This will give you two spaces per press, but actual \t in your code will still be viewed as 8 characters.

提交回复
热议问题