eye_mew
eye_mew

Reputation: 9153

Backspace to beginning of line in IntelliJ

Pretty much everywhere in OSX, it's possible to backspace all the way to the beginning of a line using command+Backward delete. I can't find a way to set up this behaviour within IntelliJ IDEA, and I find this very...

...backward.

Upvotes: 7

Views: 1978

Answers (1)

sina72
sina72

Reputation: 5101

Here are some basic keyboard shortcuts:

  • Move Caret to Word Start: Ctrl+Left.
  • Move Caret to Line Start: Home
  • Delete from Caret to Word Start: Ctrl+Backspace
  • Delete from Caret to Line Start: Shift+Home, Delete

I assume you want to Delete from Caret to Line Start ("backspace to beginning of line").

If you want to execute this action with a single key, simply record a macro and assign a keyboard shortcut for it.

  • Menu -> Macros -> Start Macro Recording
  • Press Shift+Home
  • Press Delete
  • Menu -> Macros -> Stop Macro Recording
  • Assign a name, for example "Delete to Line Start"
  • Assign a shortcut to your macro: Menu -> File -> Settings -> Keymap

Here's a screenshot of the settings dialog. I tested it and it works fine. Assign a shortcut to your macro

Upvotes: 4

Related Questions