[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-visualstar b62323e92b 01/19: initial commit
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-visualstar b62323e92b 01/19: initial commit |
Date: |
Thu, 6 Jan 2022 04:00:15 -0500 (EST) |
branch: elpa/evil-visualstar
commit b62323e92bb4049245df0291c4fe6d74a5e20515
Author: Bailey Ling <bling@live.ca>
Commit: Bailey Ling <bling@live.ca>
initial commit
---
evil-visualstar.el | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/evil-visualstar.el b/evil-visualstar.el
new file mode 100644
index 0000000000..49c7951653
--- /dev/null
+++ b/evil-visualstar.el
@@ -0,0 +1,70 @@
+;;; evil-visualstar.el --- Starts a * or # search from the visual selection
+
+;; Copyright (C) 2013 by Bailey Ling
+;; Filename: evil-visualstar.el
+;; Description: Starts a * or # search from the visual selection
+;; Author: Bailey Ling
+;; Created: 2013-09-24
+;; Version: 0.0.0
+;; Keywords: evil visualstar
+;; Package-Requires: (evil)
+;;
+;; This file is not part of GNU Emacs.
+;;
+;; 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, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+;; Floor, Boston, MA 02110-1301, USA.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'evil)
+
+;;;###autoload
+(defun evil-visualstar/begin-search (beg end direction)
+ (when (evil-visual-state-p)
+ (evil-exit-visual-state)
+ (let ((selection (regexp-quote (buffer-substring-no-properties beg end))))
+ (if (eq evil-search-module 'isearch)
+ (progn
+ (setq isearch-forward direction)
+ (evil-search selection direction t))
+ (let ((pattern (evil-ex-make-search-pattern selection))
+ (direction (if direction 'forward 'backward)))
+ (setq evil-ex-search-direction direction)
+ (setq evil-ex-search-pattern pattern)
+ (evil-ex-search-activate-highlight pattern)
+ (evil-ex-search-next))))))
+
+;;;###autoload
+(defun evil-visualstar/begin-search-forward (beg end)
+ "Search for the visual selection in forward direction."
+ (interactive "r")
+ (evil-visualstar/begin-search beg end t))
+
+;;;###autoload
+(defun evil-visualstar/begin-search-backward (beg end)
+ "Search for the visual selection in backward direction."
+ (interactive "r")
+ (evil-visualstar/begin-search beg end nil))
+
+(define-key evil-visual-state-map (kbd "*")
'evil-visualstar/begin-search-forward)
+(define-key evil-visual-state-map (kbd "#")
'evil-visualstar/begin-search-backward)
+
+(provide 'evil-visualstar)
+
+;;; evil-visualstar.el ends here
- [nongnu] branch elpa/evil-visualstar created (now 06c053d8f7), ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 253e8a594c 05/19: add commentary and version bump, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar b62323e92b 01/19: initial commit,
ELPA Syncer <=
- [nongnu] elpa/evil-visualstar 87a5bd8457 14/19: reworded comment and bumped version nr, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar aafece5bc2 10/19: Commit 2015-05-08 19:00, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 687ae03c24 18/19: set jumps and don't repeat. resolves #7 and #9., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 37de793029 16/19: Update Evil homepage URL, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar c8ca5799b5 13/19: Added missing quote, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 1bb9ecd6f5 02/19: add readme., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar a18dfe7612 09/19: Merge pull request #5 from andyque/master, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar eb996eca00 17/19: Merge pull request #8 from syohex/update-evil-url, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 06c053d8f7 19/19: should be defined as motions, not commands, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-visualstar 3f9bb0e6a1 11/19: Allow for option controlled persistent visualstar searches, ELPA Syncer, 2022/01/06