Package peppy :: Package plugins :: Module text_transforms :: Class CapitalizeWord
[frames] | no frames]

Class CapitalizeWord

                        object --+            
                                 |            
actions.base.BufferBusyActionMixin --+        
                                     |        
                    object --+       |        
                             |       |        
              debug.debugmixin --+   |        
                                 |   |        
              actions.SelectAction --+        
                                     |        
   actions.base.TextModificationAction --+    
                                         |    
     actions.base.WordOrRegionMutateAction --+
                                             |
                                            CapitalizeWord

Title-case the current word or words in the highlighted region.

This will also move the cursor to the start of the next word.

Instance Methods
 
mutate(self, txt)
Change to title case -- first letter capitalized, rest lower case.

Inherited from actions.base.WordOrRegionMutateAction: action, mutateSelection

Inherited from actions.base.BufferBusyActionMixin: isActionAvailable, isEnabled

Inherited from actions.SelectAction: __call__, __init__, getMenuItemName, getSubIds, getTooltip, initPostHook, initPreHook, insertIntoMenu, insertIntoToolbar, showEnable

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods

Inherited from actions.base.TextModificationAction: worksWithMajorMode

Inherited from actions.SelectAction: getHelp, setAcceleratorText

Inherited from debug.debugmixin: dprint

Class Variables
  alias = 'capitalize-region-or-word'
This alias holds an emacs style name that is used during M-X processing.
  name = 'Capitalize'
This is the name of the menu entry as it appears in the menu bar.
  key_bindings = {'emacs': 'M-C'}
Map of platform to default keybinding.
  default_menu = (('Transform/Case', 810), 100)
The default menu location is specified here as a tuple containing the menu path (separated by / characters) and a number between 1 and 1000 representing the position within the menu.

Inherited from actions.SelectAction: default_toolbar, global_id, icon, keyboard, stock_id, tooltip

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

mutate(self, txt)

 

Change to title case -- first letter capitalized, rest lower case.

Parameters:
  • txt - input text
Returns:
text resulting from the desired processing
Overrides: actions.base.WordOrRegionMutateAction.mutate