🐫 evil operator to cycle *-case in text objects
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
Makefile
evil-string-inflection.el
license.md
readme.org

readme.org

evil-string-inflection

https://travis-ci.org/ninrod/evil-string-inflection.svg?branch=master https://melpa.org/packages/evil-string-inflection-badge.svg https://stable.melpa.org/packages/evil-string-inflection-badge.svg https://img.shields.io/badge/license-GPLv3-blue.svg

https://image.slidesharecdn.com/theneverendingrestapidesigndebate-devoxx2015-151121085802-lva1-app6892/95/the-neverending-rest-api-design-debate-18-638.jpg?cb=1448097446

Evil operator to cycle text objects through camelCase, kebab-case, snake_case and UPPER_CASE.

It wraps the string-inflection package. Credits and thanks go to Akira Ikeda for writing this library.

Installation

(use-package evil-string-inflection :ensure t)

Usage

This package provides the g~ operator to transform CamelCase words into snake_case. You can customize the binding.

Try using g~io.

Examples

  • here’s a sample cycle. cursor is on []:
Camel[C]aseWord
-> g~io
camelCaseWord
-> .
camel-case-word
-> .
camel_case_word
-> .
CAMEL_CASE_WORD
-> .
CamelCaseWord

Customization

  • you can customize evil-string-inflection’s binding as follows:
;; it is g~ by default
(define-key evil-normal-state-map "gR" 'evil-operator-string-inflection)

LICENSE

GNU General Public License v3
Copyright (c) 2017-2018 Filipe Silva (ninrod)