mirror of
https://codeberg.org/scip/viking-mode.git
synced 2025-12-16 20:10:59 +01:00
final tests ok, some tweaks to the docs
This commit is contained in:
19
README.md
19
README.md
@@ -17,14 +17,13 @@ shortly.
|
||||
The default key binding is C-d, but you may also bind it to C-k or
|
||||
whatever you wish.
|
||||
|
||||
If you press C-d the first time, the word at point will be deleted.
|
||||
If you press it again, the remainder of the line from point will be
|
||||
deleted. If pressed again, the whole line, then the paragraph and
|
||||
finally the whole buffer will be deleted.
|
||||
If you press C-d the first time, the word at point will be deleted
|
||||
(but if there's no word at point but whitespaces or an empty line,
|
||||
they will be deleted instead, which is the same as M-SPC).
|
||||
|
||||
Like:
|
||||
|
||||
[keep pressing ctrl] C-d - word
|
||||
[keep pressing ctrl] C-d - word | spc
|
||||
C-d C-d - line remainder
|
||||
C-d C-d C-d - line
|
||||
C-d C-d C-d C-d - paragraph
|
||||
@@ -33,6 +32,11 @@ Like:
|
||||
However, this only works when pressing the key in a row. If you do
|
||||
something else in between, it starts from scratch (i.e. delete word).
|
||||
|
||||
By default viking-mode is greedy: after applying a kill function it
|
||||
looks if point ends up alone on an empty line or inside whitespaces.
|
||||
In such a case, those will be deleted as well. The greedy behavior may
|
||||
be turned off however.
|
||||
|
||||
# Install
|
||||
|
||||
To use, save viking-mode.el to a directory in your load-path.
|
||||
@@ -58,6 +62,11 @@ it into berserk mode by setting 'viking-really-delete to t:
|
||||
|
||||
(setq viking-really-delete t)
|
||||
|
||||
To turn off greedy deleting of whitespace remainders, set
|
||||
'viking-greedy-kill to nil:
|
||||
|
||||
(setq viking-greedy-kill nil)
|
||||
|
||||
You can change the default key binding by:
|
||||
|
||||
(define-key viking-mode-map (kbd "C-k") 'viking-kill-thing-at-point)
|
||||
|
||||
Reference in New Issue
Block a user