An open API service indexing awesome lists of open source software.

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

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