branch: elpa/evil-nerd-commenter
commit d61c6629b44b8eb15378b2b75addcd5011b752d9
Author: Chen Bin <[email protected]>
Commit: Chen Bin <[email protected]>
updated doc
---
README.org | 11 ++++++++++-
evil-nerd-commenter.el | 8 ++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/README.org b/README.org
index cd3993648f..09a6f65a2d 100644
--- a/README.org
+++ b/README.org
@@ -28,7 +28,7 @@ The code snippet embedded in org file will automatically be
detected and *correc
* Install
evil-nerd-commenter is already uploaded to [[http://melpa.org]]. The best way
to install is Emacs package manager.
-* Set up
+* Setup
** Use default key bindings
You need only one line into ~/.emacs,
#+BEGIN_SRC lisp
@@ -61,6 +61,15 @@ Insert following code into you ~/.emacs,
)
#+END_SRC
+** Assign keybindings manually
+Manual setup is necessary for certain major modes (matlab-mode, for example)
+
+Here is the minimum setup,
+#+begin_src elisp
+(defun matlab-mode-hook-config ()
+ (local-set-key (kbd "M-;") 'evilnc-comment-or-uncomment-lines))
+(add-hook 'matlab-mode-hook 'matlab-mode-hook-config)
+#+end_src
* Usage
** Available commands and hotkeys
Here are available commands. They are NOT dependent on
[[http://emacswiki.org/emacs/Evil][evil-mode]]:
diff --git a/evil-nerd-commenter.el b/evil-nerd-commenter.el
index 04ee1d7d4f..8fba0b4837 100644
--- a/evil-nerd-commenter.el
+++ b/evil-nerd-commenter.el
@@ -80,6 +80,14 @@
;; "\\" 'evilnc-comment-operator
;; )
;;
+;; Use case 3,
+;; For certain major modes, you need manual setup to override its original
+;; keybindings,
+;;
+;; (defun matlab-mode-hook-config ()
+;; (local-set-key (kbd "M-;") 'evilnc-comment-or-uncomment-lines))
+;; (add-hook 'matlab-mode-hook 'matlab-mode-hook-config)
+;;
;; See https://github.com/redguardtoo/evil-nerd-commenter for more use cases.
;;; Code: