| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
ReindentBase
Base class for reindenting code.
This class provides a base class for major modes that want to implement their own reindention code. The reindentLine method should use information about the major mode to indent the line to its correct column. For instance, the PythonMode uses the IDLEReindentMixin to calculate the correct indent column of the python source code line.
This operation is typically bound to the tab key, but regardless to the actual keypress to which it is bound is *only* called in response to a user keypress.
| Instance Methods | |||
|
|||
|
|||
|
Inherited from |
|||
| Properties | |
|
Inherited from |
| Method Details |
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 |
Reindent the specified line to the correct level. This method should be overridden in subclasses to provide the proper indention based on the type of text file. The default implementation provided here will indent to the previous line. Return the new cursor position, in case the cursor has moved as a result of the indention. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Feb 21 14:51:16 2008 | http://epydoc.sourceforge.net |