VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.57k stars 1.3k forks source link

Normal mode `die` deletes all text #9058

Closed pjcon closed 1 month ago

pjcon commented 1 month ago

Describe the bug In normal mode, if you input die, all text is deleted. I have accidentally entered this a few times and it's alarming.

Perhaps it is a new feature and stands for "delete inner everything"?

To Reproduce Steps to reproduce the behavior:

  1. Open VSCode with Vim mode enabled
  2. Create a new document
  3. Input a bunch of text e.g:
    In publishing and graphic design, Lorem
    ipsum is a placeholder text commonly used to demonstrate the 
    visual form of a document or a typeface without relying on meaningful
    content. Lorem ipsum may be used as a placeholder before the
    final copy is available.
  4. Enter <esc>die
  5. See that everything is deleted
  6. Enter u to retrieve all the text

Expected behavior

Comparison with Vim: Nothing should happen.

Screenshots delete-inner-everything

Environment (please complete the following information):

HenryTSZ commented 1 month ago

vim-textobj-entire

Adds two useful text-objects:

Usage examples:

pjcon commented 1 month ago

So it is actually a feature to operate on the entire buffer.

I'll close the issue.