0
0

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 viコマンド(簡単メモ)

0
Last updated at Posted at 2021-09-15

起動

ターミナル
$ vi ファイル名

モード

i     インサートモード(編集開始)
v      ビジュアルモード(範囲選択)
esc コマンドモードに戻る

カーソル移動

[→] 右 
[←]  左
[↑]  上
[↓]  下
[^] 現在行の先頭位置へ
[$]  現在行の末端位置へ
[G]  最終行の先頭位置へ

画面スクロール(移動)

H   画面先頭へ
M   画面中央へ
L   画面最終部へ

削除

x    削除 
dd  カーソルの1行を削除
D   カーソルから行の終端まで削除

取り消し

u  取り消し(直前の操作)

コピー&ペースト

yy   カーソル位置の行をコピー
p     ペースト

終了 

:q      終了(quit)
:q!     保存せず終了
:wq     保存して終了(w = write)
:wq!  保存して強制終了
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?