search

Home  >  Q&A  >  body text

windows-7 - Using cmder under win7, how to set vim tabs to 4 spaces?

cmder is installed under win7 and I can use vim happily, but the tab indentation seems to be 8 spaces.
How to set it to 4 spaces?

黄舟黄舟2742 days ago847

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-05-16 16:36:15

    Try adding these lines inside vimrc:

    " 对所有 tab 显示 4 个空格
    set tabstop=4
    " 按下 <TAB> 键相当于输入 4 个空格
    set expandtab

    This line is optional and has nothing to do with the tab you asked about, but my personal suggestion is to add:

    " 用 < 或者 > 调整缩进时,缩进四个空格
    set shiftwidth=4

    reply
    0
  • Cancelreply