30
30

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 3 years have passed since last update.

vimで任意の文字列が含まれる行を一括で削除する方法

Last updated at Posted at 2014-08-20

任意の文字列が含まれる行を一括で削除したい場合

:g/hogefuga/d

逆に任意の文字列が含まれる行以外を削除したい場合

:v/hogefuga/d

たったこれだけです。
すごく便利ですね!

参考書籍

Vimテクニックバイブル~作業効率をカイゼンする150の技
実践Vim 思考のスピードで編集しよう! (アスキー書籍)
マスタリングVim
入門vi 第6版

30
30
1

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?