1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vimで余分なスペース・改行コードを自動削除するプラグイン

Last updated at Posted at 2017-11-07

vim-non-blank

というプラグインを書きました。
余分なスペース・改行コードをファイル保存時に自動で削除します。

インストール

vim-plugを使う場合、

Plug 'raviqqe/vim-non-blank'

使い方

ファイルを保存するときに、

foo  $
$
bar baz    $
  $
$
$

($は改行コード)

これが、

foo$
$
bar baz$

自動でこうなります。

問題点

普通にautocmdでコマンド走らせてるだけなので編集履歴がファイル保存時に無駄に更新されます。
オートセーブ有効にしてると辛い。

まとめ

なんとかならんでしょうか。

1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?