guide-key icon indicating copy to clipboard operation
guide-key copied to clipboard

Add the helper commands for setup major-mode

Open aki2o opened this issue 12 years ago • 0 comments

The following config is a bother for me.

(defun guide-key/my-hook-function-for-org-mode ()
  (guide-key/add-local-guide-key-sequence "C-c")
  (guide-key/add-local-guide-key-sequence "C-c C-x")
  (guide-key/add-local-highlight-command-regexp "org-"))
(add-hook 'org-mode-hook 'guide-key/my-hook-function-for-org-mode)

So, I've added the helper for the user like me. The usage is the following.

;; Basic
(guide-key/setup-local-keystroke 'org-mode :kbd "C-c C-x")
;; If keystroke is multiple
;; (guide-key/setup-local-keystroke 'org-mode :kbd '("C-c" "C-c C-x"))
;; If org-... is not highlighted
;; (guide-key/setup-local-keystroke 'org-mode :kbd "C-c C-x" :not-highlight t)

;; If add the highlight rule
(guide-key/setup-local-highlight 'org-mode "\\`outline-")

Best regards.

aki2o avatar Feb 24 '14 07:02 aki2o