打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
vi 中设置tab为4和自动转换成空格
:set tabstop=4        " Force tabs to be displayed/expanded to 4 spaces (instead of default 8).
:set softtabstop=4    " Make Vim treat key as 4 spaces, but respect hard Tabs.
:                     "   I don't think this one will do what you want.
:set expandtab        " Turn Tab keypresses into spaces. Sounds like this is happening to you.
"    You can still insert real Tabs as [Ctrl]-V [Tab].
:set noexpandtab      " Leave Tab keys as real tabs (ASCII 9 character).
:1,$retab!            " Convert all tabs to space or ASCII-9 (per "expandtab"),
"   on lines 1_to_end-of-file.
:set shiftwidth=4     " When auto-indenting, indent by this much.
"   (Use spaces/tabs per "expandtab".)
:help tabstop         " Find out more about this stuff.
:help vimrc           " Find out more about .vimrc/_vimrc :-) 
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
vim设置参考
vim tab设置为4个空格
~/.vimrc
Debian 安装 vim
VIM空格和TAB转换
Linux中国vimrc文件
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服