For instance, I want to convert "CamelCasedName" to "camel_cased_name". Is there a way to do this in emacs?
|
|
This small bit of code from this page, with a wrapper function and an underscore replacing the hyphen with an underscore, could easily be turned into a command to do that. (Check that it treats leading caps to suit you):
|
||||
|
|
|
Emacs has glasses-mode which displays camelcase names with underscores in between. (See also http://www.emacswiki.org/emacs/GlassesMode). If you want to actually change the text of the file |
|||
|
|
|
For display purposes only, you can use this:
If you want a script which actually converts the text, I imagine you'd have to write some elisp. That question is better asked on stack overflow. |
|||
|
|
|
Moritz Bunkus wrote an elisp function to toggle between CamelCase and c_style |
|||
|
|