Skip to content

Instantly share code, notes, and snippets.

@xhan
Last active December 23, 2015 17:19
Show Gist options
  • Save xhan/6667933 to your computer and use it in GitHub Desktop.
Save xhan/6667933 to your computer and use it in GitHub Desktop.
我的vim配置
"四个空格
set tabstop=4
"使用space代替tab
set expandtab
" #自动缩进的宽度
set shiftwidth=4
" 根据文件中其他地方的缩进空格个数来确定一个 tab 是多少个空格
set smarttab
" :retab 将所有 tab 扩展成空格,这样就完美了
set list " show trailing whitespace
set listchars=tab:▸\ ,trail:▫
set number " show line numbers
set ruler " show where you are
@xhan
Copy link
Author

xhan commented Oct 29, 2013

unexpand > stdout # convert spaces to tab
:retab # convert tabs to spaces again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment