fixed doc

This commit is contained in:
TLINDEN
2016-05-14 19:52:09 +02:00
parent 0a7a80603d
commit 89757338cc
2 changed files with 40 additions and 9 deletions

View File

@@ -4,8 +4,9 @@ Kill first, ask later - an emacs mode for killing things quickly
# Introduction
Viking minor mode enables you to delete things at point with one key
stroke at once. More and more will be deleted if you repeat the key
stroke.
stroke at once. More and more will be deleted if you repeat the key
stroke. As visual feedback the thing to be deleted will be highlighted
shortly.
The default key binding is C-d, but you may also bind it to C-k or
whatever you wish.
@@ -51,6 +52,10 @@ it into berserk mode by setting 'viking-really-delete to t:
(setq viking-really-delete t)
You can change the default key binding by:
(define-key viking-mode-map (kbd "C-k") 'vk/kill-thing-at-point)
In case you don't like the default key binding cascade, you may also
use separate bindings for each kill function, e.g.:
@@ -61,6 +66,14 @@ use separate bindings for each kill function, e.g.:
(define-key viking-mode-map (kbd "C-d p") 'vk/kill-paragraph)
(define-key viking-mode-map (kbd "C-d a") 'vk/kill-buffer)
Also, the font face of the short highlight can be modified:
M-x customize-face (select viking-blink)
Or, modify all available viking-mode variables interactively with:
M-x customize-group (select viking-mode)
Besides, the primary function of viking-mode is vk/last-key-repeats,
which returns the number of times the last key have been pressed.
This can be used for other things as well, for example:

View File

@@ -33,7 +33,8 @@
;; Viking minor mode enables you to delete things at point with one
;; key stroke at once. More and more will be deleted if you repeat the
;; key stroke.
;; key stroke. As visual feedback the thing to be deleted will be
;; highlighted shortly.
;; The default key binding is C-d, but you may also bind it to C-k or
;; whatever you wish.
@@ -75,15 +76,29 @@
;; (setq viking-really-delete t)
;; You can change the default key binding by:
;; (define-key viking-mode-map (kbd "C-k") 'vk/kill-thing-at-point)
;;
;; In case you don't like the default key binding cascade, you may
;; also use separate bindings for each kill function, e.g.:
;; (define-key viking-mode-map (kbd "C-d") nil) ;; turn C-d into a prefix-key
;; (define-key viking-mode-map (kbd "C-d w") 'vk/kill-word)
;; (define-key viking-mode-map (kbd "C-d r") 'vk/kill-line-from-point)
;; (define-key viking-mode-map (kbd "C-d l") 'vk/kill-line)
;; (define-key viking-mode-map (kbd "C-d p") 'vk/kill-paragraph)
;; (define-key viking-mode-map (kbd "C-d a") 'vk/kill-buffer)
;; (define-key viking-mode-map (kbd "C-d") nil) ;; turn C-d into a prefix-key
;; (define-key viking-mode-map (kbd "C-d w") 'vk/kill-word)
;; (define-key viking-mode-map (kbd "C-d r") 'vk/kill-line-from-point)
;; (define-key viking-mode-map (kbd "C-d l") 'vk/kill-line)
;; (define-key viking-mode-map (kbd "C-d p") 'vk/kill-paragraph)
;; (define-key viking-mode-map (kbd "C-d a") 'vk/kill-buffer)
;; Also, the font face of the short highlight can be modified:
;; M-x customize-face (select viking-blink)
;; Or, modify all available viking-mode variables interactively with:
;; M-x customize-group (select viking-mode)
;; Besides, the primary function of viking-mode is vk/last-key-repeats,
;; which returns the number of times the last key have been pressed.
@@ -340,3 +355,6 @@ kill function then."
;; un-*ing-believable: I'm done *g*
(provide 'viking-mode)
;;; viking-mode.el ends here