我是靠谱客的博主 彩色衬衫,这篇文章主要介绍sublime 把 tab 转成 4 个空格,现在分享给大家,希望可以做个参考。

 

Preferences -> Settings-User

{
    "tab_size":4,
    "translate_tabs_to_spaces": true,

    "draw_white_space": "all", // 显示出空白符

    "trim_trailing_white_space_on_save": true // 保存时自动去除行尾空白符

}

再敲 tab 的时候就自动换成空格了

 

 

如果想把已经写入当前文件的 tab 都转成空格

Ctrl +` 呼出 Console

>>> view.run_command('expand_tabs')

 

 

PS: vim 中的设置

set nu

set shiftwidth=4

set tabstop=4

set softtabstop=4

set expandtab

set autoindent

 

 

参考链接:

Sublime关于tab转空格的设置技巧

vim tab变空格

http://sublime-text-unofficial-documentation.readthedocs.org

https://www.sublimetext.com/docs/api-reference

http://docs.sublimetext.info/en/sublime-text-2/

 

转载于:https://www.cnblogs.com/hangj/p/4974558.html

最后

以上就是彩色衬衫最近收集整理的关于sublime 把 tab 转成 4 个空格的全部内容,更多相关sublime内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(143)

评论列表共有 0 条评论

立即
投稿
返回
顶部