/change-case.el

Convert strings between camelCase, PascalCase, Capital Case, snake_case and more for Emacs

Primary LanguageEmacs Lisp

change-case.el

Transform a string between camelCase, PascalCase, snake_case, kebab-case, doted.case and others by Emacs Lisp. Inspired by https://github.com/blakeembrey/change-case/ .

Screenshot

https://media.giphy.com/media/fW4lOLLIfCk7OleiyW/source.gif

Supported case

  • [x] dotted.case
  • [x] path/case
  • [x] snake_case
  • [x] kebab-case
  • [x] PascalCase
  • [x] camelCase

Dependencies

  • dash
  • s
  • ert

Install

This package is not yet melpa packaging.

Install by quelpa

(require 'quelpa)

(quelpa '(change-case :fetcher git :url "git@gist.github.com:e8a10244aac6308de1323d1f6685658b.git"))

See here for how to install quelpa itself https://github.com/quelpa/quelpa#installing-packages.

Install by package.el

  1. Download change-case.el.
  2. M-x package-install-file RET /PATH/TO/DOWNLOADED/change-case.el RET

Testing

Using ert.

  1. Open change-case.el file.
  2. Run M-x ert on change-case.el buffer.

Output example::

Selector: t
Passed:  13
Failed:  0
Skipped: 0
Total:   13/13

Started at:   2020-04-29 15:28:31+0900
Finished.
Finished at:  2020-04-29 15:28:31+0900

.............

Bug report and Contributing

Feature request
https://github.com/TakesxiSximada/change-case.el/issues
Bug report
https://github.com/TakesxiSximada/change-case.el/issues
Pull request and Patch
https://github.com/TakesxiSximada/change-case.el/pulls

Other solutions

This project was started to inspired by https://github.com/blakeembrey/change-case/. There are other projects with similar purposes.

Emacs Lisp

TypeScript