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 hard to press.

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 combine both just-one-space and delete-horizontal-space by cycling between one space, no space at all and original spacing.

So now I have in .emacs:

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


all / emacs / java / python


admin(1), anki(1), blog(1), css(2), cygwin(2), emacs(3), fs(1), git(1), hg(2), html(1), interview(11), java(1), js(3), lighttpd(1), mobile(1), naming(1), printer(1), problem(5), quiz(6), rst(1), security(1), sql(1), srs(1), unit(1), utils(1), vcs(1), web(2), win(2)