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

Class Tabify

                        object --+            
                                 |            
actions.base.BufferBusyActionMixin --+        
                                     |        
                    object --+       |        
                             |       |        
              debug.debugmixin --+   |        
                                 |   |        
              actions.SelectAction --+        
                                     |        
   actions.base.TextModificationAction --+    
                                         |    
     actions.base.LineOrRegionMutateAction --+
                                             |
                                            Tabify

Replace spaces with tabs at the start of lines.

Instance Methods
 
mutateLines(self, lines)
Operate on the list of lines and return a new list of lines.

Inherited from actions.base.LineOrRegionMutateAction: 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 = 'tabify'
This alias holds an emacs style name that is used during M-X processing.
  name = '&Tabify'
This is the name of the menu entry as it appears in the menu bar.
  default_menu = ('Transform', -700)
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, key_bindings, keyboard, stock_id, tooltip

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

mutateLines(self, lines)

 

Operate on the list of lines and return a new list of lines.

Method designed to be overridden by subclasses to provide the text operation desired by the subclass.

Parameters:
  • lines - array of lines from the selected region
Returns:
array of lines resulting from the desired processing
Overrides: actions.base.LineOrRegionMutateAction.mutateLines
(inherited documentation)