LoginSignup
0
1

More than 5 years have passed since last update.

Sublime Textで空白文字が半角英字より小さく表示されるときの対処法

Posted at

SublimeText上でスペースをインデントとして使うと、なぜかgit diffしたときにずれていた。

def my_method
  hoge = if foo?
           hoo
         end
end

のつもりで打っていても、git diffで見てみると次の用になっている

def my_method
  hoge = if foo?
            hoo <-ここがずれている
          end   <-ここがずれている
end

原因は半角スペース1つ分の大きさが、半角英字1文字分の大きさよりも小さかったから。

そこで、以下の様に明示的にフォントを指定する。

SublimeTextの上部メニューの基本設定(Preferense) -> Settings
からユーザ設定(二分割されているエディタの右側)の "font_size": **
の上に1行追加する

"font_face": "Courier New",
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1