What is the emacs equivalent of vi's dd? I want to delete the current line. Tried CTRL + k but it only deletes from current position.
How to delete the current line in Emacs
emacs
Related Topic
- How to replace a character with a newline in Emacs
- How to scroll line by line in GNU Emacs
- Differences between Emacs and Vim
- How to reload .emacs after changing it
- Git – How to make Git use the editor of the choice for commits
- Delete line backwards (Emacs)
- How to make nrepl-ritz-jack-in work remotely over TRAMP / Emacs
Best Answer
There is also
which invokes
M-x kill-whole-line
.If you'd like to set a different global key binding, you'd put this in ~/.emacs:
If you want to delete a number of whole lines, you can prefix the command with a number:
Sometimes I also find
C-x z
helpful: