Evil operator to cycle text objects through camelCase, kebab-case, snake_case and UPPER_C 8134 ASE.
It wraps the string-inflection package.
place the file in your load-path and write (require 'evil-string-inflection)
in your ~/.emacs.d/init.el
.
This package provides the g~
operator to transform CamelCase words into snake_case.
You can customize the binding.
Try using g~iw
.
- here’s a sample cycle. cursor is on
[]
:
Camel[C]aseWord
-> g~iW
camelCaseWord
-> .
camel-case-word
-> .
camel_case_word
-> .
CAMEL_CASE_WORD
-> .
CamelCaseWord
- you can customize
evil-string-inflection
’s binding as follows:
;; it is g~ by default
(define-key evil-normal-state-map "gR" 'evil-operator-replace-with-char)
GNU General Public License v3
Copyright (c) 2017 Filipe Silva (ninrod)