Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gVimのコマンドで一致を参照するにはどうすればよいですか?
g
試合を入れ替えずに試合後に×をつけたいと思います。たとえば、次のコマンドでは、create_title2 回は記述しません。
create_title
:g/create_title/s/create_title/X/
あなたは得るべきです
create_titleX
コマンドを実行して
create_tile
コマンドの一部が必要な理由がわかりませんg。代替は一致する行にのみ機能します。これがあなたが探しているものです:
:%s/create_title/&X/
は&、一致したテキスト全体を表します。
&
:%s/\(create_title\)/\1X/g
私のために働きます。(あなたの質問を正しく理解していれば)。