• 请不要在回答技术问题时复制粘贴 AI 生成的内容
njutree
V2EX  ›  程序员

再来一个无聊的问题, softtab 到底是不是 tab,你们说我看着。除(程序员)以外,非请勿入。

  •  
  •   njutree · Dec 23, 2014 · 6020 views
    This topic created in 4203 days ago, the information mentioned may be changed or developed.
    11 replies    2014-12-23 14:46:30 +08:00
    njutree
        1
    njutree  
    OP
       Dec 23, 2014
    自己回复自己我觉得应该是吧,都叫tab,而不是叫xxspace
    Azone
        2
    Azone  
       Dec 23, 2014
    用空格代替 tab
    rannnn
        3
    rannnn  
       Dec 23, 2014
    楼主怎么这么纠结tab问题。
    chrishine
        4
    chrishine  
       Dec 23, 2014
    soft tab 能当作 x space, 也不会有space 和 tab之争了.
    sublime text 里面设置tab size 4, 一个 tab过去,记事本打开是tab size 8.
    很多用space不用tab的, 举的大旗就是"space是绝对的,tab是相对的,为了统一,都用绝对的space吧".却不知道现在的space怎么能影响以前的代码.
    ChiangDi
        6
    ChiangDi  
       Dec 23, 2014 via Android
    softtab 敲的是 tab 键,出来的是 space 啊,就是这么回事,还有什么疑问。

    hardtab 敲出来的是真 tab,你可以在 Sublime 里面试一下, 选中缩进的时候,如果你没有设置 softtab,出现的是横线,否则出现的是点点点。
    Tink
        7
    Tink  
    PRO
       Dec 23, 2014
    不理解楼主,softtab就是按了tab出现了四个空格,hardtab就是制表符的间距,有啥纠结
    tsui
        8
    tsui  
       Dec 23, 2014
    @chrishine 你没设置tab转成空格吧。。。。
    fengchang
        9
    fengchang  
       Dec 23, 2014   ❤️ 3
    @chrishine 在sublime里配置
    "tab_size": 4,
    "translate_tabs_to_spaces": true,
    才算是softtab吧
    右下角会显示Spaces:4
    这有什么问题吗?
    dingyaguang117
        10
    dingyaguang117  
       Dec 23, 2014
    都用tab实体键, 然后转换成空格
    chrishine
        11
    chrishine  
       Dec 23, 2014
    @fengchang @tsui
    看了下,自己这里确实没设置true.
    见笑了.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3790 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 00:09 · PVG 08:09 · LAX 17:09 · JFK 20:09
    ♥ Do have faith in what you're doing.