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.

vimtutor(1.7)  削除、移動、取り消し (初心者)

Last updated at Posted at 2022-04-18

削除コマンド

dw 指定した文字の先頭から単語を削除していく。

d$ 指定した文の末尾から削除していく。

2.3 オペレータとモーション

テキスト変更を加えるコマンドはオペレータとモーションになる。

削除コマンドdのオペレータは次のようになる。
d モーション

d 削除コマンド

モーション 何に対して働きかけるか

モーション一覧の一部

w 空白を含む単語の末尾までを削除

e 空白を含まない単語の末尾まで削除

$ 選択した位置から行末まで削除

わからないところ

ややこしくてよくわからない。
オペレータ、モーションの区別がわからない。

2.4 モーションにカウントをつける

[数字] e 選択している単語から[数字]番目の単語の語尾に移動

[数字] w 選択している単語から[数字]先の単語の先頭に移動

0     行の先頭に移動

2.5 より多くを削除するためにカウントをつける

オペレータとカウントとモーションをつけると多くの文字を消すことができる。

d2w カーソルから2つ先の単語の先頭まで削除する

d2e カーソルから2番目の単語の末尾まで削除する

...

2.6 行の操作

dd 行の全体を削除する

[カウント] dd カウント分を削除

2.7 やり直しコマンド

u  最後のコマンドを取り消す

U  行全体のコマンドを取り消す

ctrl + r コマンドを再実行 取り消しの取り消し

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?