0

In Emacs the M-\ keybinding (alt and backslash) runs the e-lisp function 'delete-horizontal-space'.

When M-\ is pressed in any of the whitespace between two words on a line it deletes all whitespace between those two words e.g. "word1 word2", "word1 word2" would both become "word1word2".

When M-\ is pressed in any of the whitespace between the start of a line and the first character on the line it deletes all whitespace. So: " word1" becomes "word1".

When M-\ is pressed in any of the trailing whitespace of a line it deletes it.

My question is: does intellij have a keybinding for the same functionality? If not, how can I make M-\ behave as in intelliJ as it does on Emacs?

Drew
  • 29,895
  • 7
  • 74
  • 104
vab2048
  • 1,065
  • 8
  • 21

1 Answers1

0

IntelliJ IDEA doesn't have a built-in action for that, one can implement it as a plug-in. You can check the open source IdeaVim plug-in which provides a lot of custom editor actions.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904