Oleksandr Gavenko's blog
2017-01-29 23:20 Emacs cycle-spacing

M-\\ (delete-horizontal-space) is used for removing all spaces between non-spaces.

But this key binding is not convenient to strike and remember...

There is similar key binding M-SPC (just-one-space) - remove all spaces and add one.

In 2013-01-30 Michal Nazarewicz introduce new function cycle-spacing that combines both just-one-space and delete-horizontal-space by cycling between one space, no space and original spacing.

Now I have in my .emacs:

(when (fboundp 'cycle-spacing)
  (global-set-key (kbd "M-SPC") 'cycle-spacing))


all / emacs / java / python


adb(1), admin(1), android(1), anki(1), blog(1), c(1), css(2), cygwin(2), driver(1), emacs(3), fs(1), git(2), gradle(1), hardware(1), hg(2), html(1), interview(13), java(2), js(3), lang(2), lighttpd(1), mobile(1), naming(1), oracle(1), print(1), problem(5), quiz(6), rst(1), security(1), sql(2), srs(1), style(1), unit(1), utils(1), vcs(3), web(2), win(2), windows(1)