Package peppy :: Module fundamental :: Class StandardReindentMixin
[frames] | no frames]

Class StandardReindentMixin

  object --+    
           |    
ReindentBase --+
               |
              StandardReindentMixin
Known Subclasses:

Default implementation of a ReindentBase for generic text files.

This class provides a default implementation of line reindentation; it simply reindents the line to the indentation of the line above it.

Instance Methods
 
getReindentColumn(self, linenum, linestart, pos, indpos, col, indcol)
User hook to return the new indentation position.

Inherited from ReindentBase: reindentLine

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

Properties

Inherited from object: __class__

Method Details

getReindentColumn(self, linenum, linestart, pos, indpos, col, indcol)

 

User hook to return the new indentation position.

This routine should be overridden in subclasses to provide the correct indentation of the first not-blank character of the line.

linenum: current line number linestart: position of character at column zero of line pos: position of cursor indpos: position of first non-blank character in line col: column number of cursor indcol: column number of first non-blank character

return: the number of columns to indent, or None to leave as-is

Overrides: ReindentBase.getReindentColumn
(inherited documentation)