[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-nerd-commenter 188a475cfc 013/235: Merge branch 'mast
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-nerd-commenter 188a475cfc 013/235: Merge branch 'master' of github.com:redguardtoo/evil-nerd-commenter |
Date: |
Thu, 6 Jan 2022 02:59:30 -0500 (EST) |
branch: elpa/evil-nerd-commenter
commit 188a475cfc25a62a646a0d1420dafe5c7b31f3ca
Merge: 6e618b3c7f 4dca3cc33d
Author: chen bin <chenbin.sh@gmail.com>
Commit: chen bin <chenbin.sh@gmail.com>
Merge branch 'master' of github.com:redguardtoo/evil-nerd-commenter
* 'master' of github.com:redguardtoo/evil-nerd-commenter:
Fixed typos in README.org
upgraded to version 0.0.3, now you can toggle flag to comment empty lines
make my email not too public and updated README
---
README.org | 17 ++++++++++-------
evil-nerd-commenter-pkg.el | 2 +-
evil-nerd-commenter.el | 16 ++++++++++++++--
pkg.sh | 2 +-
4 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/README.org b/README.org
index 4ed7c1bbda..f8beccc135 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,4 @@
-* evil-nerd-commenter (current version 0.0.2)
+* evil-nerd-commenter (current version 0.0.3)
As a developer, I often need comment/uncomment lines for debugging or adding
some short comment in the code block.
As I know, the [[http://www.vim.org/scripts/script.php?script_id=1218][Nerd
Commenter]] for Vim is the most efficient way to doing this thing.
Unfortunately, there is no similar plugin in Emacs.
@@ -8,6 +8,8 @@ That's why I develop this Nerd Commenter simulator for Emacs
people.
Say you want to comment out nine lines. Instead pressing "C-space M-9 C-n
M-;", now you can press "M-9 M-;" or ",9ci".
The key point is you need NOT mark any text to comment line(s)!
+
+So you strike less keys to comment code than the origial "M-x comment-dwim".
* Install
evil-nerd-commenter is already uploaded to [[http://marmalade-repo.org/]]. So
the best way to install it is using Emacs' package manager.
* Set up
@@ -23,7 +25,7 @@ The advantage of use "M-;" is you can set mark on the first
line and scroll seve
I prefer vi key binds. So I also use
[[http://emacswiki.org/emacs/Evil][evil-mode]] and evil-leader.
-Here is my configuration for evil-mode:
+Here is my configuration for evil-mode (OPTIONAL, some people don't use
evil-mode at all because they don't like vi key bindings):
#+BEGIN_SRC lisp
(require 'evil)
(require 'evil-leader)
@@ -34,27 +36,28 @@ Here is my configuration for evil-mode:
)
#+END_SRC
* Usage
-These are available commands:
+Here are available commands:
- evilnc-comment-or-uncomment-lines :: comment/uncomment lines.
- evilnc-comment-or-uncomment-to-the-line :: comment/uncomment from current
line to the specified line.
+- evilnc-toggle-comment-empty-lines :: toggle the flag to comment/uncomment
empty lines
Example 1:
"C-u NUM M-x evilnc-comment-or-uncomment-lines", comment/uncomment next NUM
lines.
Example 2:
-Select a region and "M-x evilnc-comment-or-uncomment-lines". The region will
automatically expand to contain whole lines. Then comment/uncomment the region.
+Select a region and "M-x evilnc-comment-or-uncomment-lines". The region will
be *automatically expanded to contain whole lines*. Then we comment/uncomment
the region.
Example 3:
If you use [[http://emacswiki.org/emacs/Evil][evil-mode]] and get the package
evil-leader installed. Comment 9 lines could be as easily as type "9<Leader>ci"
(only four keys).
Example 4:
-"C-u 56 M-x evilnc-comment-or-uncomment-to-the-line", comment/uncomment from
current line to line 56.
+"C-u 56 M-x evilnc-comment-or-uncomment-to-the-line", comment/uncomment *from
current line* to line 56.
* Contact me
-You can report bugs at [[https://github.com/redguardtoo/evil-nerd]]-commenter.
My email is <chenbin DOT sh AT gmail>.
+You can report bugs at [[https://github.com/redguardtoo/evil-nerd]]-commenter.
My email is <chenbin.sh@gmail.com>.
* License
Copyright (C) 2012 Chen Bin
-Author: Chen Bin <chenbin DOT sh AT gmail DOT com
+Author: Chen Bin <chenbin.sh@gmail.com>
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
diff --git a/evil-nerd-commenter-pkg.el b/evil-nerd-commenter-pkg.el
index cb1b99eb3e..6ca316b37a 100644
--- a/evil-nerd-commenter-pkg.el
+++ b/evil-nerd-commenter-pkg.el
@@ -1,2 +1,2 @@
-(define-package "evil-nerd-commenter" "0.0.2"
+(define-package "evil-nerd-commenter" "0.0.3"
"Comment/uncomment lines efficiently. Like Nerd Commenter in
Vim")
diff --git a/evil-nerd-commenter.el b/evil-nerd-commenter.el
index 0bce1dba07..82e79ad413 100644
--- a/evil-nerd-commenter.el
+++ b/evil-nerd-commenter.el
@@ -1,10 +1,10 @@
;;; evil-nerd-commenter --- Comment/uncomment lines efficiently. Like Nerd
Commenter in Vim
;; Copyright (C) 2012 Chen Bin
-;; Author: Chen Bin <chenbin.sh@gmail.com>
+;; Author: Chen Bin <chenbin DOT sh AT gmail>
;; URL: http://github.com/redguardtoo/evil-nerd-commenter
;; Keywords: commenter vim line evil
-;; Version: 0.0.2
+;; Version: 0.0.3
;; This file is not part of GNU Emacs.
@@ -48,6 +48,18 @@
)
))
+;;;###autoload
+(defun evilnc-toggle-comment-empty-lines ()
+ (interactive)
+ (if comment-empty-lines
+ (setq comment-empty-lines nil)
+ (setq comment-empty-lines t)
+ )
+ (message (if comment-empty-lines
+ "Empty line(s) will be commented"
+ "Empty line(s) will NOT be commented"))
+ )
+
;;;###autoload
(defun evilnc-comment-or-uncomment-lines (&optional NUM)
"Comment or uncomment lines.
diff --git a/pkg.sh b/pkg.sh
index 7ae5d5fb77..6e9d0020e7 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-pkg=evil-nerd-commenter-0.0.2
+pkg=evil-nerd-commenter-0.0.3
mkdir $pkg
cp README.org $pkg
cp *.el $pkg
- [nongnu] elpa/evil-nerd-commenter b670f69b64 221/235: add emacs27 to ci, (continued)
- [nongnu] elpa/evil-nerd-commenter b670f69b64 221/235: add emacs27 to ci, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 2401d871ad 217/235: use GPL version 3, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 8809dccfdb 223/235: user can customize comment style, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 9e7e969719 226/235: try stay put when comment in evil visual line state, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 563cdc154b 222/235: fix typo and add unit test for web-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 5535be5421 227/235: (line . column), ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c0f49e4e87 228/235: fixed minor issue, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 118bebd02a 229/235: use github workflows instead of travis ci, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c48a95c3ff 234/235: feat: support .tsx files, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter ba535606b4 003/235: add a use case, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 188a475cfc 013/235: Merge branch 'master' of github.com:redguardtoo/evil-nerd-commenter,
ELPA Syncer <=
- [nongnu] elpa/evil-nerd-commenter 64ee33dac4 022/235: insert live demo link into README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 1cec61caac 038/235: Removed redundant double information, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 1f32941bce 047/235: v1.2.0, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 3ab19bfa4e 052/235: updated README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c41c462d50 065/235: clean the doc v1.2.8, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter d11aab5454 071/235: tweak README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter b976b45063 073/235: fixed regression bug in 1.3.0, v1.3.1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 31c6e05c89 081/235: updated README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 41910491e7 101/235: updated README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter e7f57427be 109/235: Fixes #45, ELPA Syncer, 2022/01/06