Tab Vs Space preferences in Vim

前端 未结 7 1078
眼角桃花
眼角桃花 2020-12-07 07:31

Vim is very accommodating when it comes to tab Vs. space preferences. As I understand it, the tabstop setting indicates the width of a tab character. The

7条回答
  •  渐次进展
    2020-12-07 07:58

    You can in edit mode also use Ctrl-T to indent and Ctrl-D to deindent to the next indentation level as set by shiftwidth, regardless of the tabstop, softtabstop or expandtab settings. Vim will automatically add/remove spaces or tabs to bring you to the right column.

    If you use these commands to control indentation instead of Tab/Backspace you don't have to worry about all these tab settings fitting together and always get to the correct indentation level.

提交回复
热议问题