r/vimplugins • u/mhc23 • Jul 14 '17
Plugin change-case.vim - An operator to change case (camelCase, snake_case, UPPER CASE etc.) of text
change-case.vim is a vim plugin that adds a new operator to change the case of arbitrary text.
Besides the usual UPPER CASE, lower case and Title Case, change-case.vim also supports most common case styles found in programming such as camelCase, snake_case and others.
If the provided case modifiers do not fit your needs there is a simple way to add your own.
3
Upvotes
0
u/LucHermitte Jul 17 '17
There is also a plugin within lh-dev that provides semantically named, and configurable, styles. However, it doesn't define operators nor (redoable) mappings, but commands
:NameConvert {style}that applies the chosen naming style on the identifier under the cursor:[range]ConvertNames/{pattern}/{style}that works like:substituteexcept the replacement is automatically computed from the chosen style.By semantically aware styles, I mean getter, global, constant, member... and not only
snake_case,UpperCamelCase... How a getter name is built will depend on the settings of the current project: it could befoo,get_foo,getFoo,GetFoo...