improve mwim integration
1. By default let `C-e` move to the end of line first. 2. Minor improvements to readme file
This commit is contained in:
parent
71f8ae8e38
commit
237d1143d1
|
@ -24,30 +24,37 @@ The commands defined in this layer are taken from various sources like [[https:/
|
||||||
|
|
||||||
* Features
|
* Features
|
||||||
** Smart line navigation
|
** Smart line navigation
|
||||||
Subsequent presses of ~C-a~ toggles between the beginning of the line and the first non-whitespace character.
|
Subsequent presses of ~C-a~ toggles between the beginning of the line and the
|
||||||
Similarly, subsequent presses of ~C-e~ will toggle between the end of the code and the end of the comments.
|
first non-whitespace character.
|
||||||
|
|
||||||
|
Similarly, subsequent presses of ~C-e~ will toggle between the end of the code and
|
||||||
|
the end of the comments.
|
||||||
|
|
||||||
** =spacemacs/backward-kill-word-or-region=
|
** =spacemacs/backward-kill-word-or-region=
|
||||||
A combination of =kill-region= and =backward-kill-word=, depending on whether
|
A combination of =kill-region= and =backward-kill-word=, depending on whether there
|
||||||
there is an active region. If there's an active region kill that. If not kill
|
is an active region. If there's an active region kill that. If not kill the
|
||||||
the preceding word.
|
preceding word.
|
||||||
|
|
||||||
* Install
|
* Install
|
||||||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
||||||
add =better-defaults= to the existing =dotspacemacs-configuration-layers= list in this
|
add =better-defaults= to the existing =dotspacemacs-configuration-layers= list in
|
||||||
file.
|
this file.
|
||||||
|
|
||||||
* Configuration
|
* Configuration
|
||||||
Choose if ~C-a~ first brings you to the beginning of the line or the beginning of the code (first non-whitespace character)
|
Choose if ~C-a~ first brings you to the beginning of the line or the beginning of
|
||||||
|
the code (first non-whitespace character).
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(better-defaults :variables
|
(better-defaults :variables
|
||||||
better-defaults-move-to-beginning-of-code-first t)
|
better-defaults-move-to-beginning-of-code-first t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Choose if ~C-e~ first brings you to the end of the line or the end of the code (before or after comments)
|
Choose if ~C-e~ first brings you to the end of the line or the end of the code
|
||||||
|
(before or after comments).
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(better-defaults :variables
|
(better-defaults :variables
|
||||||
better-defaults-move-to-end-of-code-first t)
|
better-defaults-move-to-end-of-code-first nil)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
When nil, first stroke will go to the beginning of line.
|
When nil, first stroke will go to the beginning of line.
|
||||||
Subsequent strokes will toggle between beginning of line and beginning of code.")
|
Subsequent strokes will toggle between beginning of line and beginning of code.")
|
||||||
|
|
||||||
(defvar better-defaults-move-to-end-of-code-first t
|
(defvar better-defaults-move-to-end-of-code-first nil
|
||||||
"when t, first stroke of C-e will move the cursor to the end of code (before comments).
|
"when t, first stroke of C-e will move the cursor to the end of code (before comments).
|
||||||
When nil, first stroke will go to the end of line (after comments).
|
When nil, first stroke will go to the end of line (after comments).
|
||||||
Subsequent strokes will toggle between end of line and end of code.")
|
Subsequent strokes will toggle between end of line and end of code.")
|
||||||
|
|
Loading…
Reference in a new issue