LoginSignup
4
4

More than 5 years have passed since last update.

[atom] テキストが合字(リガチャ)されてコードのインデントが崩れる問題

Last updated at Posted at 2016-10-03

動機

atomが合字(リガチャ)をサポートしたことにともなって, fi, ftのような文字を入力した場合に1文字幅で扱われる.
そのため, それ以降の同じ行の文字がリガチャをサポートしない環境でみたときに, エディタ上での表示から1文字分ずれた状態になる.
これにより, 複数行のコードで, コードの整形を行った場合などに, コードが意図したとおりに整形されないことがおきた.

解決方

リガチャのサポートを無効にすることで, 問題を回避することができる. https://github.com/atom/atom/issues/3821#issuecomment-249427387

~/.atom/styles.less
atom-text-editor {
  -webkit-font-feature-settings: "liga" off, "calt" off;
}
4
4
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
4
4