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

[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



reply via email to

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