spacemacs/layers/better-defaults/README.org

54 lines
2.0 KiB
Org Mode
Raw Normal View History

#+TITLE: Better Defaults contribution layer for Spacemacs
2015-06-10 16:44:30 +00:00
[[file:img/emacs.png]]
* Table of Contents :TOC@4:
- [[#description][Description]]
- [[#install][Install]]
- [[#functions][Functions]]
- [[#spacemacssmart-move-beginning-of-line][spacemacs/smart-move-beginning-of-line]]
- [[#spacemacsbackward-kill-word-or-region][spacemacs/backward-kill-word-or-region]]
2015-06-10 16:44:30 +00:00
- [[#key-bindings][Key bindings]]
* Description
This layer enhances the default commands of Emacs and is primarily intended to
be used with the =emacs= editing style as it does not change anything in the Vim
key bindings.
2015-06-10 16:44:30 +00:00
However the =emacs= editing style is not required, you can still use this layer
while you are using the =vim= editing style if you have some kind of mixed
style.
2015-06-10 16:44:30 +00:00
The commands defined in this layer are taken from various sources like [[https://github.com/bbatsov/prelude][Prelude]].
2015-06-10 16:44:30 +00:00
* Install
To use this contribution add it to your =~/.spacemacs=
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers '(better-defaults))
#+END_SRC
* Functions
** spacemacs/smart-move-beginning-of-line
2015-06-10 16:44:30 +00:00
Pressed one time, go to the first non-whitespace character of the line, pressed
again, go to the beginning of the line.
2015-06-10 16:44:30 +00:00
** spacemacs/backward-kill-word-or-region
A combination of =kill-region= and =backward-kill-word=, depending on whether
there is an active region. If there's an active region kill that. If not kill
the preceding word.
2015-06-10 16:44:30 +00:00
* Key bindings
| Key Binding | Description |
|-------------+----------------------------------------------------------------------------------|
| ~C-a~ | smart beginning of line |
| ~C-w~ | backward kill word or region |
2015-06-10 16:44:30 +00:00
| ~C-y~ | Automatically indenting after pasting. With prefix argument, paste text as it is |