午後から→オーバークロック

駆け出しハッカー()によるプログラミング・サービス開発備忘録。

Sublime Textのプラグインまとめ

Sublime Text 3(Mac)に自分が入れたプラグインをまとめました。

一般

日本語対応

  • IMESupport
    • Windowsのみ必要。Macだと要らないです。
  • ConvertToUTF8
  • Codecs33

ユーティリティ

  • SideBarEnhancements
  • Trailing Spaces
  • RecentActiveFiles
  • Local History
  • SublimeOnSaveBuild
  • AdvancedNewFile
  • Terminal
  • BoundKeys
  • Smart Delete

Web系

SassやLESSなどのプリプロセッサは省略。

  • Goto-CSS-Declaration
  • LiveReload
    • ST3だとここからdev版を入手して手動インストールし、コマンドパレットからLiveReload: Enable/disable Plug-ins
    • アドオンは2.x
  • SublimeServer
  • Live Style
  • Inc-Dec-Value

Goto-CSS-Declarationはcmd+rightcmd+leftを使ってしまっているので、
キーバインドを変更しましょう。

Key Bindings - User

[
    // change key binding for goto_css_declaration
    {
        "keys": ["super+right"],
        "command": "move_to",
        "args": {"to": "eol"}
    },
    {
        "keys": ["super+left"],
        "command": "move_to",
        "args": {"to": "bol"}
    },
    {
        "keys": ["ctrl+right"], "command": "goto_css_declaration",
        "args": {"goto": "next"}
    },
    {
        "keys": ["ctrl+left"],  "command": "goto_css_declaration",
        "args": {"goto": "prev"}
    }
]

外部リソース

  • Nettuts+ Fetch
    • Fetch: Manageで設定追加
  • cdnjs

コード補完・整形

SublimeCodeIntelは敢えて除去

  • SublimeLinter
  • All Autocomplete
  • Tag
  • CSScomb
  • AutoFileName
  • jQuery

  • Emmet

  • Hayaku

Emmetはキーバインドが多いので、一部(ctrl+ectrl+d)無効化
また、HayakuとバッティングしないようにCSSを無効化

PackageSetting -> Emmet -> Setting - User

{
    "disabled_keymap_actions": "expand_abbreviation,balance_outward",
    "disable_tab_abbreviations_for_scopes": "css,less,sass,scss,stylus"
}

その他の言語

Python

  • Anaconda
    • ST2だとSublimeJedi
    • PEP8のLinterも含むので、Python Flake8 Lintとか要らない

PackageSetting -> Anaconda -> Setting - User

{
    "pep8_max_line_length": 109,
    "anaconda_linter_mark_style": "none",
    "anaconda_linter_underlines": true,
    "pep8_ignore":
    [
        "E231","E302"
    ]
}

Markdown

  • OmniMarkupPreviewer
  • Monokai Extended
    • 有効化(Preferences -> ColorScheme)
  • Markdown Extended
    • syntax有効化(View -> syntax -> Open All with...)

その他の設定

Preferences: Settings - User

{
    "show_encoding": true,
    "show_line_endings": true
}

Preferences: Key Bindings - User

[
  // PageUp
  {
      "keys": ["ctrl+["],
      "command": "move",
      "args": {"by": "pages", "forward": false}
  },
  // PageDown
  {
      "keys": ["ctrl+]"],
      "command": "move",
      "args": {"by": "pages", "forward": true}
  },
  // jump to line top without indent
  {
      "keys": ["ctrl+a"],
      "command": "move_to",
      "args": { "to": "bol", "extend": false}
  }
]

ターミナル

sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/bin/subl

注意すること

プラグインをたくさん入れると、どうしても機能がかぶることがあります。
そのため、設定が反映されない、と思うときは、他のパッケージを疑ってみましょう。

また、User設定を作るときは、Default設定ファイルが一番良いと思います。

参考

Web制作者のためのSublime Textの教科書 今すぐ最高のエディタを使いこなすプロのノウハウ

Web制作者のためのSublime Textの教科書 今すぐ最高のエディタを使いこなすプロのノウハウ