Search code examples
vimvim-plugin

For Vim, is there a plugin that can help me manipulate strings like Rails Inflector?


I often need to change a string from one "format" to another, and find this tedious to do by hand.

Rails has a great Inflector api that allows one to manipulate strings like this, and this has been ported to other languages like Javascript Inflect

For example

MyClass -> my_class
MyClass -> my-class

My Title -> my-title
My Title -> my title

Etc.

Is there a Vim plugin that would let me do this while editing?


Solution

  • For future reference I tried Inflector.vim for a while but recently found vim-caser and prefer it as it's more full-featured.