LoginSignup
26
16

More than 5 years have passed since last update.

ファイル末尾をつねに改行で終端させる IntelliJ 系の設定

Posted at

ファイル末尾にかならず改行を入れる設定、IntelliJ 系で .editorconfig めんどくさい人はせめてこれをチェックしましょう。

eof-lf.png

Editor > General > Other
Ensure line feed at file end on Save

改行ないファイル末尾に行を足すとコミットがこうなるから:

  9 行目
- 10 行目
+ 10 行目
+ 11 行目

まあしのごの言わずに EditorConfig プラグイン使いましょう。変な diff を出さないように。

.editorconfig
insert_final_newline = true

どんなエディタでもEditorConfigを使ってコードの統一性を高める

26
16
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
26
16