Web + Life Hack

〜True But Useless〜

【Sublime Text2】【設定】Sublime Text2初心者だからこそ抑えたい設定まとめ


デフォルトこそが正!!!



そんな時代が僕にもありました。
ましてや「Sublime Text2」においてはほとんど、触ったことがないので
デフォルト以外は怖くてカスタマイズをしていなかったのですが、

半角、全角の識別がしづらい

日本語入力したりすると「ガタガタ」動いてコメントとか入れづらい



といったことが多発したので、今回、以下の様な設定を行いました。

1・プログラムに最適なフォント『Ricty』を入れる。

Ricty (リクティ) は Linux 環境での研究・開発に適したフリーなプログラミング用 TrueType フォントです。EmacsVim を用いた C、C++FORTRANPythonPerlRubyAWKsedシェルスクリプトLaTeX などのコーディングにおける使用を想定しています。

http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty.html



コーディングに適したってのが良いですね!

前提条件:

  • macであること
  • Home brewをインストール済みであること
g08m11% brew tap sanemat/font

# 下の様なログが出れば成功
Cloning into '/usr/local/Library/Taps/sanemat-font'...
remote: Reusing existing pack: 104, done.
remote: Total 104 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (104/104), 17.08 KiB | 0 bytes/s, done.
Resolving deltas: 100% (40/40), done.
Checking connectivity... done.

g08m11% brew install ricty

# 以下のようなログが出れば成功
OS X provides the BSD gettext library and some software gets confused if both are in the library path.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/gettext/lib
    CPPFLAGS: -I/usr/local/opt/gettext/include


2・『Ricty』などの設定をSublime Text2に反映させる。

上記の1だけではまだ未設定のままなので、それをSublime Text2に設定していきます。

Sublime Text2を起動し、「Command + ,」で設定ファイルを開く
・以下のソースをコピペ
{
 "flatland_square_tabs": true,
 "ignored_packages":    [        "Vintage"    ],
 // "theme": "Flatland Dark.sublime-theme",
 // "color_scheme": "Packages/User/Flatland Dark (SL).tmTheme",
 "auto_indent": true,
 "draw_white_space": "all",
 "ensure_newline_at_eof_on_save": true,
 "font_face": "Ricty",
 "font_size": 13,
 "highlight_line": true,
 "ignored_packages":    [        "Vintage"    ],
 "indent_to_bracket": true,
 "line_padding_top": 0,
 "shift_tab_unindent": true,
 "smart_indent": true,
 "tab_size": 2,
 "translate_tabs_to_spaces": true,
 "trim_trailing_white_space_on_save": true,
 "use_tab_stops": true,
 "word_wrap": false
 }
・コピペした内容を保存するため「Command+ s」



以下の画面の様になれば成功です。
「"font_size": 13」の数字を変更することで、フォントサイズの変更が出来ます!

f:id:g08m11:20140530012121p:plain