Search code examples
pythoneclipsepydev

How can I convert camel case name into underscore name using Eclipse/PyDev editor?


How can I quickly convert GenerateDocumentsFinishTask into generate_documents_finish_task using Eclipse/PyDev editor?

What is keybinding for it - if it possible?

I often using such convention:

class_name = ClassName()

Solution

  • If you write:

    ClassName()

    And press Ctrl+1 in that same line, you'll be prompted with an Assign to local which should do exactly what you want (considering you actually want to assign to a local).

    Now, if you don't want to assign to a local but want to make that conversion, use the AnyEdit (http://andrei.gmxhome.de/anyedit/) plugin (in AnyEdit, Ctrl+Alt+B then Ctrl+Alt+K can be used for that).