zoukankan      html  css  js  c++  java
  • sublime text帮你更好的写python

    在Google的Python风格指南中,有这样的要求:

    用4个空格来缩进代码

    但是每次在敲代码的时候,用一个tab确实比敲四次空格方便的多。令人欣慰的是sublime text 2能够把tab转换成4个空格。具体的设置就是:

    在Preference-defalut中能找到这样的两句话:

        // The number of spaces a tab is considered equal to
        "tab_size": 4,
    
        // Set to true to insert spaces when tab is pressed
        "translate_tabs_to_spaces": false,
    

    一个tab等于四个空格,同时把tabs_to_spaces的开关置为true。

        // The number of spaces a tab is considered equal to
        "tab_size": 4,
    
        // Set to true to insert spaces when tab is pressed
        "translate_tabs_to_spaces": true
    

    sublime text的默认是:当你在代码中键入 冒号: 的时候,他会自动在下一行缩进一个tab。设置成功以后,缩进的就是四个空格了。  

  • 相关阅读:
    JavaScript中的__proto__
    移动前端调试页面–weinre
    nodo合并多个mp3文件
    enctype和Content-type有什么关系
    vscode 实用的插件
    前端跨域问题及解决方案
    小小的js
    如何使用eslint
    RN记录
    numpy的索引
  • 原文地址:https://www.cnblogs.com/stemon/p/5100174.html
Copyright © 2011-2022 走看看