SpaceTextEditor(Space)

base classes — bpy_struct, Space

class bpy.types.SpaceTextEditor(Space)

Text editor space data

find_text

Text to search for with the find tool

Type:string, default “”, (never None)
font_size

Font size to use for displaying the text

Type:int in [8, 32], default 0
margin_column

Column number to show right margin at

Type:int in [0, 1024], default 0
replace_text

Text to replace selected text with using the replace tool

Type:string, default “”, (never None)
show_line_highlight

Highlight the current line

Type:boolean, default False
show_line_numbers

Show line numbers next to the text

Type:boolean, default False
show_margin

Show right margin

Type:boolean, default False
show_syntax_highlight

Syntax highlight for scripting

Type:boolean, default False
show_word_wrap

Wrap words if there is not enough horizontal space

Type:boolean, default False
tab_width

Number of spaces to display tabs with

Type:int in [2, 8], default 0
text

Text displayed and edited in this space

Type:Text
top

Top line visible

Type:int in [0, inf], default 0
use_find_all

Search in all text data-blocks, instead of only the active one

Type:boolean, default False
use_find_wrap

Search again from the start of the file when reaching the end

Type:boolean, default False
use_live_edit

Run python while editing

Type:boolean, default False
use_match_case

Search string is sensitive to uppercase and lowercase letters

Type:boolean, default False
use_overwrite

Overwrite characters when typing rather than inserting them

Type:boolean, default False
visible_lines

Amount of lines that can be visible in current editor

Type:int in [-inf, inf], default 0, (readonly)
region_location_from_cursor(line, column)

Retrieve the region position from the given line and character position

Parameters:
  • line (int in [-inf, inf]) – Line, Line index
  • column (int in [-inf, inf]) – Column, Column index
Returns:

Region coordinates

Return type:

int array of 2 items in [-1, inf]

draw_handler_add()

Undocumented

draw_handler_remove()

Undocumented

Inherited Properties

Inherited Functions