rainit2006 / Linux

Linux basic
0 stars 0 forks source link

Vim #2

Open rainit2006 opened 7 years ago

rainit2006 commented 7 years ago

カーソル移動 vimではインサートモード中は普通カーソル移動しません。 入力漏れなどを発見した場合はノーマルモードに戻ってカーソルを移動しましょう。

よくある操作一覧 ↑      k ↓      j ←     h →     l 一文字削除    x インサートモードへ     i 次行を新規行として挿入してインサートモードへ      o 現在行に新しい行を追加してインサートモードへ      O ノーマルモードへ (インサートモードで)           esc

上書き保存 :w 名前をつけて保存 :w ファイル名 編集終了 :q 保存して終了 :wq または :x ファイルを開く :e ファイル名

もっと便利な操作は下記ページ(Vimの美味しい所) http://qiita.com/okamos/items/c97970ab34ff55ff3167 例: dd       行を削除 u        元に戻す dw     次の単語の先頭まで削除が行なえます。 10dd   10行削除可能です。

rainit2006 commented 5 years ago

These basic vi commands are

Cursor movement—h, j, k, l (left, down, up, and right) Delete character—x Delete line—dd Mode toggle—Esc, Insert (or i) Quit—:q Quit without saving—:q! Run a shell command—:sh (use 'exit' to return) Save file—:w Text search—/

rainit2006 commented 5 years ago

Functionally, vim is almost a proper superset of vi. Therefore, everything that is in vi is available in vim.