LoginSignup
2

More than 5 years have passed since last update.

vimで複数行に同じ文字列を書き込む

Last updated at Posted at 2017-09-11

Ctrl-vでvisualモードに入り、jを連打して、文字列を書き込みたい複数の行の先頭を選択する。

image.png

このあとShift-iで書き込みたい文字列(例として"- ")を入力後、escapeキーを押すと、選ばれた行全ての先頭に、入力した文字列が挿入される。

image.png

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