跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • translate_tabs_to_spaces 是什么功能?怎样设置,怎样操作会有怎样的效果?
未分類
25 11 月 2020

translate_tabs_to_spaces 是什么功能?怎样设置,怎样操作会有怎样的效果?

translate_tabs_to_spaces 是什么功能?怎样设置,怎样操作会有怎样的效果?

資深大佬 : JinTianYi456 3

迫于我测试不出来,求举例~
大佬有話說 (4)

  • 資深大佬 : jfcherng

    將代碼中的 tab 縮進依照 tab size 轉換為 空格縮進

  • 主 資深大佬 : JinTianYi456

    @jfcherng #1 我试了几种情况,都看不出效果 (更改设置不用重启 APP 吧
    1. translate_tabs_to_spaces=false
    1.1 新文件,设置使用 tab ;行首按 tab=tab, 随便输入个字符,按 tab=tab
    1.2 新文件,设置使用 space ;行首按 tab=几个空格,随便输入个字符,按 tab=几个空格
    2. translate_tabs_to_spaces=true
    2.1 同 1.1
    2.2 同 1.2

    但有其它区别: 新文件初始的缩进设置是用 tab 还是 space,但看起来和 translate_tabs_to_spaces 字面意思不同

  • 資深大佬 : jfcherng

    噢,我誤會了,我以為你是指 commad 。

    設置裡的 “translate_tabs_to_spaces” 是指當你按下 Tab 鍵時,應該要插入 (false)一個 Tab 還是 (true) 數個空格。

  • 資深大佬 : floyda

    “`Json
    // Set to true to insert spaces when tab is pressed
    “translate_tabs_to_spaces”: false,

    // If translate_tabs_to_spaces is true, use_tab_stops will make tab and
    // backspace insert/delete up to the next tabstop
    “use_tab_stops”: true,
    “`

    如果设置为`true`, 按 tab 键, 插入空格.

    留意一下 Sublime 右下角的`Spaces 4`, view setting 的级别要比 preferences settings 高.
    1. 有可能是插件修改了 view setting.
    2. 有可能是你自己勾选了设置, Sublime 记住了你的选择.

    建议使用 Spaces!!!

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具