Here is the scary section, the one feared by most users :-) Let be honest, there is a rather big amount of changes for users jumping from master 0.105 to 0.200.
First of all the most visible change is for SPC SPC which triggers now M-x
instead of avy to jump to a character. The SPC key in Spacemacs is a central
key as it acts as the leader key for all the key bindings, it made sense to
give the same sense of "root" key to the sequence SPC SPC, so now SPC SPC is
the central sequence to execute any interactive function in Emacs.
Where is the avy command then ? We reorganised from the ground up the prefix
SPC j for all jump commands. In the conventions a doubled key is often used
for the default command under a given prefix, for instance SPC b b is for
buffer selection, SPC f f for file selection etc… The "jump to character"
command of avy is then under SPC j j. Here is a detailed list of the new
SPC j prefix:
avycommands are now behind the prefixSPC jforjump:SPC j jto jump to a character in the buffer (works as an evil motion)SPC j lto jump to a line with avy (works as an evil motion)SPC j wto jump to a word in the current buffer (works as an evil motion)
- the following key bindings have been moved:
SPC j jto split a line has been moved toSPC j n(mnemonic is New line)SPC j handSPC j lhave been moved toSPC j 0andSPC j $respectively.SPC Jto split a string or sexp has been moved toSPC j s
A lot of other handy commands are under this prefix, I let you discover them with
the which key menus.
Closing, deleting or killing things ? This can be a tough call to distinguish
them and we can find such confusion in the Spacemacs key bindings, for instance
we close a window but we delete a buffer and we can also kill a buffer. Whereas
it can make sense for a lot of users, there are still users finding this
confusing. So we decided to simplify the notion of "closing/deleting" things
under the d key for delete. We moved SPC w c and SPC w C to SPC w d
and SPC w D.
More generally we tried to map prefixes SPC b and SPC w to the same actions
and bring a convention with avy commands with the capital letter to manipulate
windows and buffers. The result is detailed here:
SPC b khas been removed.SPC b C-k(kill buffer matching regexp) is nowSPC b C-dSPC b m(buffer move) has been removed because the functionality is available viaSPC wwithSPC w h/j/k/l,SPC w H/J/K/LandSPC w M.SPC b K(kill other buffers) is nowSPC b mto map withSPC w m(maximize buffer/window which effectively delete other windows).SPC b Dnow kills a buffer usingace-window.- Buffer actions don't delete the windows by default, use the universal
prefix argument to do so, for instance
SPC u SPC b dandSPC u SPC b Dwill delete the buffer and also the window. Another example isSPC u SPC b mto maximize a buffer.
Helm has a new friend in this release, it is called ivy and it has more and
more adopters. Since we have now a new package capable of doing helm commands
we decided to remove all helm related command from the prefix SPC h. SPC h
is now exclusively for help commands and the following helm commands has
been moved:
SPC h bfor =helm-filetered-bookmarks~is nowSPC f bSPC h lforhelm-resumeis nowSPC r lSPC h Lforhelm-locate-libraryis nowSPC f e l
The git related commands have been drastically simplified to leverage the
magit dispatch menu. Instead of replicating all the magit dispatch keys
under the SPC g prefix we now only define the key binding SPC g m to display
the magit dispatch menu. We get several benefits by doing so: first we free up
a lot of valuable keys under SPC g, second we have now more consistent key
bindings since we always use the magit dispatch menu. Previously we have some
actions bound to different keys between SPC g and the magit dispatch menu
accessible under ?. The new available keys allowed us to move some key
bindings directly under SPC g like git-link which is now under SPC g l,
it makes more sense to have it under SPC g l since it is agnostic of the
hosting platform (i.e. it works with GitHub, GitLab etc…).
Spacemacs layouts now restrict the scope of the buffer list opened with
SPC b b. Use SPC b B to list all the buffers of all the layouts. Also
1,2,...,9,0 keys now select a layout and close the layout menu, use
C-1,C-2,...,C-9,C-0 to switch to a layout and keep the menu opened.
To conclude this section about key binding changes and breaking changes the
micro-states in Spacemacs are dead, say hi to the transient-states. We took
advantage of the micro-states refactoring to change the name to a more
accurate new name transient-states, indeed these states leverage the notion
of transient maps in Emacs. The refactoring replaces the custom back-end by
hydra a powerful and very popular package to define transient maps. In effect
the macro spacemacs|define-micro-state is deprecated and is replaced by the
new hydra powered macro spacemacs|define-transient-state.