MenuAddress(['Refactor', 'Rename Current Module'], None, 1), ['python'])) actions.append(SimpleAction('move_current_module', ConfirmEditorsAreSaved(move_module), 'C-c r 1 v', MenuAddress(['Refactor', 'Move Current Module'], None, 1), ['python'])) actions.append(SimpleAction('module_to_package', ConfirmEditorsAreSaved(transform_module_to_package), 'C-c r 1 p', MenuAddress(['Refactor', 'Transform Module to Package'], 't', 1), ['python'])) imports = MenuAddress(['Refactor', 'Imports'], 'o', 2) core.add_menu_cascade(imports, ['python']) actions.append(SimpleAction('organize_imports', ConfirmEditorsAreSaved(organize_imports, all=False), 'C-c i o', imports.child('Organize Imports', 'o'), ['python'])) actions.append(SimpleAction('expand_star_imports', ConfirmEditorsAreSaved(expand_star_imports, all=False), 'C-c i x', imports.child('Expand Star Imports', 'x'), ['python'])) actions.append(SimpleAction('relatives_to_absolutes', ConfirmEditorsAreSaved(transform_relatives_to_absolute, all=False), 'C-c i a', imports.child('Transform Relatives to Absolute', 'a'), ['python'])) actions.append(SimpleAction('froms_to_imports', ConfirmEditorsAreSaved(transform_froms_to_imports, all=False), 'C-c i i', imports.child('Transform Froms to Imports', 'i'), ['python'])) actions.append(SimpleAction('handle_long_imports', ConfirmEditorsAreSaved(handle_long_imports, all=False), 'C-c i l', imports.child('Handle Long Imports', 'l'), ['python'])) for action in actions:
core.add_menu_cascade(MenuAddress(['Edit'], 'e'), ['all', 'none']) actions = [] others = MenuAddress(['Edit', 'Others'], 'o', 0) core.add_menu_cascade(others, ['all']) actions.append(SimpleAction('indent_block', indent_block, 'C-x i', MenuAddress(['Edit', 'Indent Block'], 'i',4), ['all','none'])) actions.append(SimpleAction('deindent_block', deindent_block, 'C-x d', MenuAddress(['Edit', 'De-indent Block'], 'd',4), ['all','none'])) actions.append(SimpleAction('next_word', next_word, 'M-f', others.child('Next Word'), ['all'])) actions.append(SimpleAction('prev_word', prev_word, 'M-b', others.child('Prev Word'), ['all'])) actions.append(SimpleAction('goto_center_line', goto_center_line, 'M-r', others.child('Goto Center Line'), ['all'])) actions.append(SimpleAction('next_page', next_page, 'C-v', others.child('Next Page'), ['all'])) actions.append(SimpleAction('prev_page', prev_page, 'M-v', others.child('Prev Page'), ['all'])) actions.append(SimpleAction('center_line', center_line, 'C-l', others.child('Center Line'), ['all'])) actions.append(SimpleAction('beginning_of_buffer', beginning_of_buffer, 'M-<', others.child('Beginning Of Buffer'), ['all'])) actions.append(SimpleAction('end_of_buffer', end_of_buffer, 'M->', others.child('End Of Buffer'), ['all']))
MenuAddress(['Source', 'Correct Line Indentation'], 'i', 1), ['python', 'rst'])) actions.append(SimpleAction('format_code', do_format_code, 'C-c C-f', MenuAddress(['Source', 'Remove Extra Spaces And Lines'], None, 1), ['python'])) actions.append(SimpleAction('comment_line', comment_line, 'C-c c', MenuAddress(['Source', 'Comment Line'], 'e', 1), ['python'])) actions.append(SimpleAction('comment_region', comment_region, 'C-c C-c', MenuAddress(['Source', 'Comment Region'], 'n', 1), ['python'])) run = MenuAddress(['Source', 'Run'], 'r', 2) core.add_menu_cascade(run, ['python']) actions.append(SimpleAction('run_module', do_run_module, 'C-c x p', run.child('Run Module', 'm'), ['python'])) actions.append(SimpleAction('run_unit_tests', run_tests, 'C-c x t', run.child('Run Unit Tests', 't'), ['python'])) actions.append(SimpleAction('run_soi', run_soi, 'C-c x s', run.child('Run SOI On Module', 's'), ['python'])) annotes = MenuAddress(['Source', 'Annotations'], 'a', 2) core.add_menu_cascade(annotes, ['python']) actions.append(SimpleAction('show_codetags', show_codetags, 'C-c a t', annotes.child('Show Codetags', 'c'), ['python'])) actions.append(SimpleAction('show_errors', show_errors, 'C-c a e', annotes.child('Show Errors', 'e'), ['python'])) actions.append(SimpleAction('show_warnings', show_warnings, 'C-c a w', annotes.child('Show Warnings', 'w'), ['python'])) actions.append(SimpleAction('show_annotations', show_all, 'C-c a a', annotes.child('Show All Annotations', 'a'), ['python']))