t9md / atom-vim-mode-plus

vim-mode improved
https://atom.io/packages/vim-mode-plus
MIT License
1.4k stars 111 forks source link

'dit' (delete inner tag) cursor position #973

Open jeffreysbrother opened 6 years ago

jeffreysbrother commented 6 years ago

Typing dit while the cursor is on a tag does not move the cursor to inside the tags. Contrast with cit, which correctly re-positions the cursor.

<div class="xyz">
     <p>something like this</p>
</div>

If the cursor is placed anywhere on the opening div, and I execute the vim command dit, the nested paragraph will be deleted as expected, but the cursor will remain in its original position rather than moving to where the paragraph used to be.

I suspect that the expected behavior is re-position the cursor, since the user will likely want to paste previously-copied code in place of the deleted code.

addition: A related, but relatively minor issue is that dat will "outdent" the cursor a bit. This does not happen when running cat.

vim-mode-plus: 1.20.0 Atom: 1.22.1 Electron: 1.6.15 Chrome: 56.0.2924.87 Node: 7.4.0 MacOS: 10.12.6