Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuchunyang/plur
Easily (I hope) search and replace multiple variants of a word
https://github.com/xuchunyang/plur
Last synced: about 1 month ago
JSON representation
Easily (I hope) search and replace multiple variants of a word
- Host: GitHub
- URL: https://github.com/xuchunyang/plur
- Owner: xuchunyang
- Created: 2016-03-28T16:07:02.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-04T09:26:18.000Z (over 8 years ago)
- Last Synced: 2024-10-16T01:45:55.931Z (3 months ago)
- Language: Emacs Lisp
- Homepage:
- Size: 34.2 KB
- Stars: 29
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* Plur
[[https://travis-ci.org/xuchunyang/plur][file:https://travis-ci.org/xuchunyang/plur.svg?branch=master]] [[https://melpa.org/#/plur][file:https://melpa.org/packages/plur-badge.svg]]This package introduces a new syntax =...{subexp1,subexp2,...}...= to search and replace a
group of words. Three commands are provided by this package:- ~plur-isearch-forward~
- ~plur-query-replace~
- ~plur-replace~** Replace example
To replace "mouse" with "cat" and "mice" with "cats" using:
#+BEGIN_SRC undefined
M-x plur-query-replace RET m{ouse,ice} RET cat{,s} RET
#+END_SRCFor more examples,
- Facility to Building
facilit{y,ies} building{,s}
- Mouse to Trackpad
m{ouse,ice} trackpad{,s}
- Swap Emacs and Vim
{emacs,vim} {vim,emacs}
** Search example
To search "mouse" and "mice" using:
#+BEGIN_SRC undefined
M-x plur-isearch-forward RET m{ouse,ice}
#+END_SRC** Requirements
- Emacs 24.4 or higher
** Installation
*** MELPA
Plur is available from [[https://melpa.org][Melpa]]. You can install it using:
#+BEGIN_SRC undefined
M-x package-install RET plur RET
#+END_SRC*** Manually
Make sure plur.el is saved in a directory in you ~load-path~ and load it. Add something
like#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "path/to/plur/")
(require 'plur)
#+END_SRCto your init file.
** Acknowledge
This package is inspired by [[https://github.com/tpope/vim-abolish][vim-abolish]].
# Local Variables:
# fill-column: 90
# End: