I know d$ or D will delete till the end of line including the letter on the cursor? Is there a way to do this excluding the letter on the cursor? I did :h d in vim and browsed around a bit but couldn't find if this is possible. I am trying to do this in AppCode with IdeaVim plugin.
The command dw will delete from the current cursor position to the beginning of the next word character. The command d$ (note, that's a dollar sign, not an 'S') will delete from the current cursor position to the end of the current line. D (uppercase D) is a synonym for d$ (lowercase D + dollar sign). Save this answer.
To delete a line in Vi or Vim, switch to normal mode first. If you're into command mode or insert mode, you can switch back to normal mode by pressing Escape. Highlight the line that you want to delete, then hit dd or D on the keyboard.
Make sure you are in the normal mode by pressing Esc . Enter the Visual mode by pressing V . Press G i.e Shift + g to select the text from the cursor to the end of the file . Now press x to delete the selected text .
In normal mode, you could do lD
or ld$
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With