emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil-nerd-commenter 43034e5604 010/235: upgraded to versio


From: ELPA Syncer
Subject: [nongnu] elpa/evil-nerd-commenter 43034e5604 010/235: upgraded to version 0.0.3, now you can toggle flag to comment empty lines
Date: Thu, 6 Jan 2022 02:59:30 -0500 (EST)

branch: elpa/evil-nerd-commenter
commit 43034e5604721f1ce721d392962c98761f0b0641
Author: chen bin <Chen.Bin@optus.com.au>
Commit: chen bin <Chen.Bin@optus.com.au>

    upgraded to version 0.0.3, now you can toggle flag to comment empty lines
---
 README.org                 | 11 ++++++-----
 evil-nerd-commenter-pkg.el |  2 +-
 evil-nerd-commenter.el     | 14 +++++++++++++-
 pkg.sh                     |  2 +-
 4 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/README.org b/README.org
index d064fa612b..3b670f7e73 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.
@@ -25,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)
@@ -36,21 +36,22 @@ 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>.
 * License
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 c639f7c757..82e79ad413 100644
--- a/evil-nerd-commenter.el
+++ b/evil-nerd-commenter.el
@@ -4,7 +4,7 @@
 ;; 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]