https://github.com/ninrod/evil-replace-with-char
:zap: evil operator to replace chars of a text object with a char
https://github.com/ninrod/evil-replace-with-char
emacs evil evil-mode operator package
Last synced: about 1 year ago
JSON representation
:zap: evil operator to replace chars of a text object with a char
- Host: GitHub
- URL: https://github.com/ninrod/evil-replace-with-char
- Owner: ninrod
- License: other
- Created: 2017-11-28T01:27:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-24T22:11:09.000Z (about 8 years ago)
- Last Synced: 2025-04-01T00:30:16.372Z (about 1 year ago)
- Topics: emacs, evil, evil-mode, operator, package
- Language: Emacs Lisp
- Homepage:
- Size: 20.5 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.org
- License: license.md
Awesome Lists containing this project
README
* evil-replace-with-char
[[https://travis-ci.org/ninrod/evil-replace-with-char.svg?branch=master][https://travis-ci.org/ninrod/evil-replace-with-char.svg?branch=master]]
[[https://melpa.org/#/evil-replace-with-char][file:https://melpa.org/packages/evil-replace-with-char-badge.svg]]
[[http://stable.melpa.org/#/evil-replace-with-char][file:http://stable.melpa.org/packages/evil-replace-with-char-badge.svg]]
[[https://www.gnu.org/licenses/gpl-3.0.en.html][https://img.shields.io/badge/license-GPLv3-blue.svg]]
evil operator to replace all chars of a text object with a char.
* Installation
place the file in your load-path and write ~(require 'evil-replace-with-char)~ in your =~/.emacs.d/init.el=.
# Just use [[https://melpa.org][MELPA]]. Here's an oneliner using [[https://github.com/jwiegley/use-package][use-package]]:
# #+BEGIN_SRC emacs-lisp
# (use-package evil-replace-with-char :ensure t)
# #+END_SRC
* Usage
This package provides an evil operator, =zx= to replace all chars of a text object with a char.
You can customize the binding.
Try using =zxiw=.
* Examples
- cursor is on =[]=
#+BEGIN_SRC text
| [] |
-> zxi|-
|----------|
#+END_SRC
* Customization
- you can customize =replace-with-char='s binding as follows:
#+BEGIN_SRC emacs-lisp
(define-key evil-normal-state-map "gR" 'evil-operator-replace-with-char)
#+END_SRC
* LICENSE
- [[https://www.gnu.org/licenses/gpl-3.0.en.html][GNU General Public License v3]]
#+BEGIN_SRC text
GNU General Public License v3
Copyright (c) 2017 Filipe Silva (ninrod)
#+END_SRC