[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-nerd-commenter 1dd577ca35 113/235: clean README
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-nerd-commenter 1dd577ca35 113/235: clean README |
Date: |
Thu, 6 Jan 2022 02:59:40 -0500 (EST) |
branch: elpa/evil-nerd-commenter
commit 1dd577ca35be288bef77b671e533af1e08a7dae3
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
clean README
---
README.org | 84 +++++++++++++-------------------------------------------------
1 file changed, 17 insertions(+), 67 deletions(-)
diff --git a/README.org b/README.org
index 0a33bab8e0..5e5b2d4745 100644
--- a/README.org
+++ b/README.org
@@ -1,6 +1,6 @@
* evil-nerd-commenter (v1.5.13)
-This program can be used *independently WITHOUT
[[http://www.emacswiki.org/Evil][Evil]]!*
+This program can be used *independently WITHOUT
[[http://www.emacswiki.org/Evil][evil-mode]]!*
A [[http://www.vim.org/scripts/script.php?script_id=1218][Nerd Commenter]]
emulation, help you comment code efficiently. For example, you can press key
`,,99j` or `99,ci` to comment out 99 lines.
@@ -26,84 +26,31 @@ 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.
-** Correct comment syantx in HTML
-It will use "/**/" inside <script> and css tags in html files and "<!-- -->"
elsewhere *automatically*!
-
-[[http://web-mode.org/][Web-mode]] is required for editing HTML file.
* Set up
-** The easy way (RECOMMENDED)
-You need add one liner into ~/.emacs to use default hotkeys,
+** The easy way
+You need add one line into ~/.emacs to use default hotkeys,
#+BEGIN_SRC lisp
(evilnc-default-hotkeys)
#+END_SRC
-
-*That's all* unless you want to modify default key bindings!
-
-The definition of evilnc-default-hotkeys:
-#+BEGIN_SRC lisp
-(defun evilnc-default-hotkeys ()
- "Set the hotkeys of evil-nerd-comment"
- (interactive)
- (global-set-key (kbd "M-;") 'evilnc-comment-or-uncomment-lines)
- (global-set-key (kbd "C-c l") 'evilnc-comment-or-uncomment-to-the-line)
- (global-set-key (kbd "C-c c") 'evilnc-copy-and-comment-lines)
- (global-set-key (kbd "C-c p") 'evilnc-comment-or-uncomment-paragraphs)
- (eval-after-load 'evil
- (define-key evil-normal-state-map ",ci"
'evilnc-comment-or-uncomment-lines)
- (define-key evil-normal-state-map ",cl"
'evilnc-comment-or-uncomment-to-the-line)
- (define-key evil-normal-state-map ",cc" 'evilnc-copy-and-comment-lines)
- (define-key evil-normal-state-map ",cp"
'evilnc-comment-or-uncomment-paragraphs)
- (define-key evil-normal-state-map ",cr" 'comment-or-uncomment-region)
- ))
-#+END_SRC
-
-As you can see, the default hotkey for commenting lines is "M-;", if you don't
use evil.
-
-You can set mark at any column of the first line, scroll down, and comment
*all the lines* by pressing "M-;".
-
-You can insert the content of evilnc-default-hotkeys into .emacs instead of
calling it directly.
-
** The hard way
-If you don't use package manager please insert below code into your ~/.emacs:
-#+BEGIN_SRC lisp
-;; I suppose you know how to install evil.
-;; If NOT, check http://www.emacswiki.org/emacs/Evil
-(require 'evil)
-(evil-mode 1)
-
-;; You need download ONLY evil-nerd-commenter.el and place it somewhere,
-;; say "somewhere"" is actually "~/.emacs.d/my-dot-el-directory".
-;; Now tell Emacs where to find evil-nerd-commenter.el
-(add-to-list 'load-path "~/.emacs.d/my-dot-el-directory")
-
-;; ",," is the default value of evilnc-hotkey-comment-operator,
-;; so below line is NOT needed.
-;; But please put it *ABOVE* the (require 'evil-nerd-commenter)!!!
-;; Please note if you use evil-leader, (setq evilnc-hotkey-comment-operator
"\\\\")
-;; does NOT work! You need set up the hotkey for command
"evilnc-comment-operator" directly.
-;; Check the end of README for sample setup
-(setq evilnc-hotkey-comment-operator ",,")
-(require 'evil-nerd-commenter)
-(evilnc-default-hotkeys)
-#+END_SRC
-
+Check "Tip 4" in "Tips" section.
* Usage
** Available commands and hotkeys
Here are available commands. They are NOT dependent on
[[http://emacswiki.org/emacs/Evil][evil-mode]]:
*** evilnc-comment-or-uncomment-lines (RECOMMENDED)
comment/uncomment lines. This command supports negative arguments.
-The hotkey is ",ci" in evil-mode and "M-;" (M means Alt key) in emacs normal
mode.
+The hotkey is ",ci" in evil-mode and "M-;" in all modes. "M" means ALT key.
-*This may be the only command and hotkey you need to learn!*
-*** evilnc-quick-comment-or-uncomment-to-the-line (RECOMMENDED)
+This may be the *only command* you need to learn!
+*** evilnc-quick-comment-or-uncomment-to-the-line
comment/uncomment from current line to the user-specified line. You can input
the rightest digit(s) to specify the line number if you want to type less.
For example, say current line number is 497. "C-u 3 M-x
evilnc-quick-comment-or-uncomment-to-the-line" will comment to the line 503
because the rightest digit of "503" is 3.
The hotkey is ",cl" or ",ll" in evil-mode and "C-c l" (C means Ctrl key) in
emacs normal mode.
-*** evilnc-comment-or-uncomment-paragraphs (RECOMMENDED)
+*** evilnc-comment-or-uncomment-paragraphs
comment/uncomment paragraphs which separated by empty lines
*** evilnc-copy-and-comment-lines
@@ -185,14 +132,13 @@ If you use [[http://emacswiki.org/emacs/Evil][Evil]], you
can use [[http://vimdo
"evilnc-hotkey-comment-operator" acts much like the delete/change operator.
Takes a motion or text object and comments it out, yanking its content in the
process.
-By default we assign the hotkey ",," to evilnc-hotkey-comment-operator. If you
prefer backslash key, check the next section "Tip 4" in next section.
+By default we assign the hotkey ",," to evilnc-hotkey-comment-operator. If you
prefer backslash key, check the "Tip 4" in "Tips" section.
Here is sample elisp code:
#+BEGIN_SRC elisp
(setq evilnc-hotkey-comment-operator ",,")
#+END_SRC
-
Example 1: ",,," to comment out the current line.
Example 2: ",,9j" to comment out the next 9 lines.
@@ -209,7 +155,9 @@ Example 7: ",,it", comment the region inside html tags (all
html major modes are
* Tips
** Tip 1, Yank in evil-mode
-You can yank to line 99 using hotkey "y99G" or "y99gg". That's the awesome
feature from evil-mode. Please read vim manual on "text objects and motions"
for more details.
+You can yank to line 99 using hotkey "y99G" or "y99gg". That's the feature
from evil-mode.
+
+Please read vim manual on "text objects and motions".
** Tip 2, change comment style
For example, use double slashes (//) instead of slash-stars (/* ... */) in
c-mode.
@@ -232,11 +180,13 @@ Most popular programming languages are supported;
- Remove line "(evilnc-default-hotkeys)" from your ~/.emacs.
- Insert below code into you ~/.emacs,
#+BEGIN_SRC elisp
+;; Emacs key bindings
(global-set-key (kbd "M-;") 'evilnc-comment-or-uncomment-lines)
(global-set-key (kbd "C-c l") 'evilnc-quick-comment-or-uncomment-to-the-line)
(global-set-key (kbd "C-c c") 'evilnc-copy-and-comment-lines)
(global-set-key (kbd "C-c p") 'evilnc-comment-or-uncomment-paragraphs)
+;; Vim key bindings
(require 'evil-leader)
(global-evil-leader-mode)
(evil-leader/set-key
@@ -247,15 +197,15 @@ Most popular programming languages are supported;
"cp" 'evilnc-comment-or-uncomment-paragraphs
"cr" 'comment-or-uncomment-region
"cv" 'evilnc-toggle-invert-comment-line-by-line
- "\\" 'evilnc-comment-operator
- )
+ "\\" 'evilnc-comment-operator ; if you prefer backslash key
+)
#+END_SRC
** Tip 5, (un)comment Lisp code
- Make sure Evil installed
- Press ",,a("
** Tip 6, work around Emacs 24.4 issue
-At first, latest version (after 2014-10-30) is OK.
+At first, latest version (after 2014-10-30) of this program is OK.
If you still got some problem, run below command in shell,
#+begin_src sh
- [nongnu] elpa/evil-nerd-commenter 20a242a085 087/235: tweak README, (continued)
- [nongnu] elpa/evil-nerd-commenter 20a242a085 087/235: tweak README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 10dd7f8f1d 090/235: Merge branch 'tuhdo-master', ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c2d8cd947e 089/235: remove some interacitve hint and fixed some bug, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter b9e34fe377 088/235: Prompt user for input and fix evilnc-kill-to-line, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter f9bdfa9a70 096/235: sample setup for evil-leader users v1.5.5, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 23e4d4d1e1 097/235: updated doc, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter a88146b600 099/235: fixed: minor bug comment to the line v1.5.7, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter dfdaae43e9 106/235: Don't byte-compile the evil bits, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter ac03a92ae6 107/235: updated README v1.5.10, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter ff0344ed82 110/235: updated README v1.5.12, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 1dd577ca35 113/235: clean README,
ELPA Syncer <=
- [nongnu] elpa/evil-nerd-commenter 06ac3b1680 115/235: README updated, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter f12142e033 118/235: Update evil-nerd-commenter-operator.el, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 0529e7c78e 119/235: clean code on kill-ring, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter ab27df65e6 120/235: clean doc v1.5.15, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 2d04ea603a 124/235: add melpa badge, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 82069b7643 121/235: comment region restricted in one line #50, v2.0, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter cb96ce729f 125/235: complete doc. make `M-x checkdoc' happy, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter f2eacda61a 127/235: Correct package header, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 54c618aada 135/235: add `evilnc-comment-and-kill-ring-save`, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter bbed0ef060 142/235: Merge pull request #70 from therockmandolinist/master, ELPA Syncer, 2022/01/06