22
12

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 1 year has passed since last update.

Vim — カット&ペーストではなく単に削除する ( "_d ) ( クリップボードにコピーしない削除 )

Last updated at Posted at 2018-08-20

"_d で可能。

何にこれ? と思うが、そのとおりにキーを入力すれば良い。

ダブルクォート・アンダースコア・ディー。
(「詠唱」、「祈り」、「念じろ」)

削除したテキストは p でもペーストされないのが分かる。

組み合わせ

  • "_3dd - 3行をコピーせずに削除

など。

呼び方

"_ぶらっくほーるれじすたー というらしい。吸い込まれそうだ。

押しにくい

そのままでは押しにくいので、キーマップを登録すると良いっぽい。

You can setup your own mappings to save typing, of course. I have these:

nnoremap d "_d
xnoremap d "_d
xnoremap p "_dP

copy paste - How to delete (not cut) in Vim? - Stack Overflow

Version

  • Vim version 8.1.250

あわせてよみたい?

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

22
12
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
22
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?