windows-7 - Using cmder under win7, how to set vim tabs to 4 spaces?
黄舟
黄舟 2017-05-16 16:34:15
0
1
871

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?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
大家讲道理

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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template