LoginSignup
2
1

More than 5 years have passed since last update.

neovim(vim)で一つずつ確認しながら文章全体を置換する

Posted at

環境

NVIM v0.2.3-dev

neovim(vim)で一つずつ確認しながら文章全体を置換する

以下のコマンドを実行する。

:%substitute/{置換前}/{置換後}/gc
# 次のコマンドでも可
:%s/{置換前}/{置換後}/gc 

フラグの意味

gフラグ

gはgdefaultの略(grepのg?)。
各行の二つ目の{置換前}も置換対象とする。
(neovim(vim)では、通常一つ目の{置換前}のみ置換対象とする)

cフラグ

cはconfirmの略
 置換前に確認をする。

参照

:h substitute
:h s_flags

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