Hacker News new | past | comments | ask | show | jobs | submit login

Ctrl + D is delete the line on some editors, duplicate the line on some editors. Prepare to be surprised when trying to to use it across environments.

Ctrl + X is the shortcut for cut (as in cut then paste). It cuts the current selection. It doesn't auto select the line if there is no selection.




Every editor is different, including vim. In Sublime Text 3, it's Shift+Delete to delete a line, and whether it goes to your clipboard or not depends on a config setting. There's a shortcut to duplicate a line too, but I don't remember the default because I've customized it.


Well, if you want to be really pedantic:

Ctrl + Y is delete without copy (at least in IntelliJ IDEA).




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: