LoginSignup
1
2

More than 3 years have passed since last update.

Vi操作に慣れるまでの道のり

Posted at

徐々にViに慣れるため、操作方法を順次更新

カーソル移動編

  • 1ページ分、下にスクロール
    • Ctl + f
  • 1ページ分、上にスクロール
    • Ctl + b
  • ファイルの先頭
    • gg
  • ファイルの最終行
    • G
  • 行末へ移動
    • $
  • 行の先頭へ
    • 0
  • 行の先頭のテキストへ
    • ^

文字列検索編

  • 上から順番に検索する
    • /<文字列>

操作取り消し

  • 一個前の操作にを取り消す
    • u

コピー&ペースト

  • 一行コピー ヤンクと言うらしい

    • yy
  • 貼り付け

    • p

文字削除

  • カーソル位置にある単語を1つ削除
    • dw

各行末空白削除

  • 正規表現で各行の空白を削除する
    • :%s/ *$//g
1
2
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
2