Sublime Text 3 環境分享

今天我將我的 sublime 環境分享給大家
先來說明一下我的環境

作業系統:Mac OS X El Capitan 10.11.1
Sublime text 3

Sublime Text 3 Overview

套件說明

安裝前置作業

如何安裝 Package Controller

安裝 Package Controller 請參考這個網站

Alignment

  • 套件官方網址:https://packagecontrol.io/packages/Alignment
  • 套件說明:

    基本上這個套件是給對於程式碼排版特別要求的人進行使用的工具
    他可以很快速的將所有等號排列整齊

  • Hotkey :

    預設: Super + Control + a
    修改成: Super + Control + z

  • 操作方式:

    這個是使用前的 Code

    image

    使用後的樣子

    image

AngularJS

  • 套件官方網址:https://packagecontrol.io/packages/AngularJS
  • 套件說明:

    對於 Angular JS 的開發者來說,這是一個非常方便的工具
    最常用的功能就是打一些關鍵字他就可以幫你 autocomplete 加快你的開發速度

  • 操作方式:

    想要使用 ng-click 這個 tag
    先打 ng 就會發現很多 option ,原因是因為 Angular JS 很多都是 ng 開頭的

    image

    這個時候多打 ng-cl 就可以看到 ng-click 了

    image

Bracket Highlighter

Color Highlighter

  • 套件官方網址:https://packagecontrol.io/packages/Color%20Highlighter
  • 套件說明:

    可以直接在程式碼上面看到你所要顯示的顏色

  • 操作方式:

    程式碼上面有顏色或是色碼,就會在下面看到底線的顏色

    image

    將游標 focus 在 red 上面,就會出現 red 的色塊

    image

    將游標放在色碼上面,也可以看到該顏色的色塊

    image

DashDoc

  • 套件官方網址:https://packagecontrol.io/packages/DashDoc
  • 套件說明:

    此套件需要搭配 Dash 這個 App 一起使用
    可以直接在程式碼上面快速的查詢這個參數的使用方式

  • Hotkey :

    預設: Control + h

  • 操作方式:

    將游標移到想要查詢的參數上面

    image

    按下 Hotkey 就會打開 Dash 了

    image

Diffy

  • 套件官方網址:https://packagecontrol.io/packages/Diffy
  • 套件說明:

    可以比對兩個不同檔案的差異

  • Hotkey :

    • 打開雙欄位

      預設: Super + Option + 2

    • 使用比對差異

      預設: Super + k then Super + d

    • 清除比對差異

      預設: Super + k then Super + c

  • 操作方式:

    開啟需要比對的兩個檔案

    image

    按下 Hotkey 進行比對即會看到比對結果

    image

    按下 Hotkey 取消比對標記就會消失了

DocBlockr

  • 套件官方網址:https://packagecontrol.io/packages/DocBlockr
  • 套件說明:

    快速的將程式碼註解 Document 補上
    支援語言:

    • JavaScript (including ES6)
    • PHP
    • ActionScript
    • Haxe
    • CoffeeScript
    • TypeScript
    • Java
    • Apex
    • Groovy
    • Objective C
    • C
    • C++
    • Rust
  • Hotkey :

    • 加入註解 Document

      預設: 輸入 [/**] then 按 tab

  • 操作方式:

    將 function 寫完後將游標移到 function 上方

    image

    打上 /**

    image

    按下 tab

    image

Git

  • 套件官方網址:https://packagecontrol.io/packages/Git
  • 套件說明:

    可以直接在 Sublime text 上面直接操作 Git 指令
    對於常常使用 Command Line 來使用 Git 的開發者就不建議安裝了,因為並沒有比較方便

  • Hotkey :

    Super + Shift + p then 打上 git command

  • 操作方式:

    打開 Command Palette [Super + Shift p]
    打 “git”

    image

    使用 git pull 指令

    image

iOpener

  • 套件官方網址:https://packagecontrol.io/packages/iOpener
  • 套件說明:

    可以直接在 Sublime text 上面透過鍵盤打開檔案
    就不需要在用到滑鼠了
    預設是打開 ~/ 這個目錄

  • Hotkey :

    Super + o

  • 操作方式:

    打開 iOpener 的搜尋 bar [Super + o]

    image

    想要看該目錄下面的檔案只需要按兩次 tab

    image

Stupid Indent

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"configuration":
[
{
"patterns": [ "Gemfile", "Rakefile", "*.rb", "*.erb", "*.scss", "*.coffee", "*.thor", "*.rake", "*.rhtml", "*.less", "*.yaml","*.yml" ],
"tab_size": 2,
"translate_tabs_to_spaces": true
},
{
"patterns": [ "*.html", "*.js", "*.css", "*.tpl" ],
"tab_size": 2,
"translate_tabs_to_spaces": true
},
{
"patterns": [ "*.php" ],
"tab_size": 4,
"translate_tabs_to_spaces": true
},
{
"patterns": [ "*.md", "*.markdown" ],
"tab_size": 4,
"translate_tabs_to_spaces": true
},
{
"patterns": [ "*.py" ],
"tab_size": 4,
"translate_tabs_to_spaces": true
}
]
}

未完待續