GtkSource.View

g GObject.GInterface GObject.GInterface Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget Gtk.Scrollable Gtk.Scrollable GObject.GInterface->Gtk.Scrollable GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Accessible->Gtk.Widget Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.TextView Gtk.TextView Gtk.Scrollable->Gtk.TextView GtkSource.View GtkSource.View Gtk.TextView->GtkSource.View Gtk.Widget->Gtk.TextView

Subclasses:

GtkSource.Map

Methods

Inherited:

Gtk.TextView (73), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Scrollable (9)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new ()

class

new_with_buffer (buffer)

get_auto_indent ()

get_background_pattern ()

get_completion ()

get_enable_snippets ()

get_gutter (window_type)

get_highlight_current_line ()

get_hover ()

get_indent_on_tab ()

get_indent_width ()

get_indenter ()

get_insert_spaces_instead_of_tabs ()

get_mark_attributes (category, priority)

get_right_margin_position ()

get_show_line_marks ()

get_show_line_numbers ()

get_show_right_margin ()

get_smart_backspace ()

get_smart_home_end ()

get_space_drawer ()

get_tab_width ()

get_visual_column (iter)

indent_lines (start, end)

push_snippet (snippet, location)

set_auto_indent (enable)

set_background_pattern (background_pattern)

set_enable_snippets (enable_snippets)

set_highlight_current_line (highlight)

set_indent_on_tab (enable)

set_indent_width (width)

set_indenter (indenter)

set_insert_spaces_instead_of_tabs (enable)

set_mark_attributes (category, attributes, priority)

set_right_margin_position (pos)

set_show_line_marks (show)

set_show_line_numbers (show)

set_show_right_margin (show)

set_smart_backspace (smart_backspace)

set_smart_home_end (smart_home_end)

set_tab_width (width)

unindent_lines (start, end)

Virtual Methods

Inherited:

Gtk.TextView (12), Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9), Gtk.Scrollable (1)

do_line_mark_activated (iter, button, state, n_presses)

do_move_lines (down)

do_move_words (step)

do_push_snippet (snippet, location)

do_show_completion ()

Properties

Inherited:

Gtk.TextView (21), Gtk.Widget (34), Gtk.Accessible (1), Gtk.Scrollable (4)

Name

Type

Flags

Short Description

auto-indent

bool

r/w/en

Whether to enable auto indentation

background-pattern

GtkSource.BackgroundPatternType

r/w/en

Draw a specific background pattern on the view

completion

GtkSource.Completion

r

The completion object associated with the view

enable-snippets

bool

r/w/en

Whether to enable snippet expansion

highlight-current-line

bool

r/w/en

Whether to highlight the current line

indent-on-tab

bool

r/w/en

Whether to indent the selected text when the tab key is pressed

indent-width

int

r/w/en

Number of spaces to use for each step of indent

indenter

GtkSource.Indenter

r/w/en

A indenter to use to indent typed text

insert-spaces-instead-of-tabs

bool

r/w/en

Whether to insert spaces instead of tabs

right-margin-position

int

r/w/en

Position of the right margin

show-line-marks

bool

r/w/en

Whether to display line mark pixbufs

show-line-numbers

bool

r/w/en

Whether to display line numbers

show-right-margin

bool

r/w/en

Whether to display the right margin

smart-backspace

bool

r/w/en

smart-home-end

GtkSource.SmartHomeEndType

r/w/en

HOME and END keys move to first/last non whitespace characters on line before going to the start/end of the line

space-drawer

GtkSource.SpaceDrawer

r

tab-width

int

r/w/en

Width of a tab character expressed in spaces

Signals

Inherited:

Gtk.TextView (15), Gtk.Widget (13), GObject.Object (1)

Name

Short Description

change-case

Keybinding signal to change case of the text at the current cursor position.

change-number

Keybinding signal to edit a number at the current cursor position.

join-lines

Keybinding signal to join the lines currently selected.

line-mark-activated

Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter).

move-lines

The signal is a keybinding which gets emitted when the user initiates moving a line.

move-to-matching-bracket

Keybinding signal to move the cursor to the matching bracket.

move-words

The signal is a keybinding which gets emitted when the user initiates moving a word.

push-snippet

The signal is emitted to insert a new snippet into the view.

show-completion

The signal is a key binding signal which gets emitted when the user requests a completion, by pressing Control + space.

smart-home-end

Emitted when a the cursor was moved according to the smart home end setting.

Fields

Inherited:

Gtk.TextView (15), Gtk.Widget (13), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.TextView

r

Class Details

class GtkSource.View(**kwargs)
Bases:

Gtk.TextView

Abstract:

No

Structure:

GtkSource.ViewClass

Subclass of [class`Gtk`.TextView].

GtkSourceView is the main class of the GtkSource.View library. Use a [class`Buffer`] to display text with a GtkSourceView.

This class provides:

  • Show the line numbers;

  • Show a right margin;

  • Highlight the current line;

  • Indentation settings;

  • Configuration for the Home and End keyboard keys;

  • Configure and show line marks;

  • And a few other things.

An easy way to test all these features is to use the test-widget mini-program provided in the GtkSource.View repository, in the tests/ directory.

GtkSource.View as Gtk.Buildable

The GtkSource.View implementation of the [iface`Gtk`.Buildable] interface exposes the [property`View`:py:data::completion<GtkSource.View.props.completion>] object with the internal-child “completion”.

An example of a UI definition fragment with GtkSource.View: ```xml

4 True

False </object> </child> </object> ```

Changing the Font

Gtk CSS provides the best way to change the font for a GtkSourceView in a manner that allows for components like [class`Map`] to scale the desired font.

``c GtkCssProvider *provider = gtk_css_provider_new (); gtk_css_provider_load_from_data (provider,

“textview { font-family: Monospace; font-size: 8pt; }”, -1, NULL);

gtk_style_context_add_provider (gtk_widget_get_style_context (view),

GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);

g_object_unref (provider); ``

If you need to adjust the font or size of font within a portion of the document only, you should use a [class`Gtk`.TextTag] with the [property`Gtk`.TextTag:family] or [property`Gtk`.TextTag:scale] set so that the font size may be scaled relative to the default font set in CSS.

classmethod new()
Returns:

a new GtkSource.View.

Return type:

Gtk.Widget

Creates a new GtkSourceView.

By default, an empty [class`Buffer`] will be lazily created and can be retrieved with [method`Gtk`.TextView.get_buffer].

If you want to specify your own buffer, either override the [vfunc`Gtk`.TextView.create_buffer] factory method, or use [ctor`View`.new_with_buffer].

classmethod new_with_buffer(buffer)
Parameters:

buffer (GtkSource.Buffer) – a GtkSource.Buffer.

Returns:

a new GtkSource.View.

Return type:

Gtk.Widget

Creates a new GtkSource.View widget displaying the buffer buffer.

One buffer can be shared among many widgets.

get_auto_indent()
Returns:

True if auto indentation is enabled.

Return type:

bool

Returns whether auto-indentation of text is enabled.

get_background_pattern()
Returns:

the GtkSource.BackgroundPatternType.

Return type:

GtkSource.BackgroundPatternType

Returns the GtkSource.BackgroundPatternType specifying if and how the background pattern should be displayed for this self.

get_completion()
Returns:

the GtkSource.Completion associated with self.

Return type:

GtkSource.Completion

Gets the [class`Completion`] associated with self.

The returned object is guaranteed to be the same for the lifetime of self. Each GtkSourceView object has a different [class`Completion`].

get_enable_snippets()
Returns:

True if enabled

Return type:

bool

Gets the [property`View`:py:data::enable-snippets<GtkSource.View.props.enable_snippets>] property.

If True, matching snippets found in the [class`SnippetManager`] may be expanded when the user presses Tab after a word in the [class`View`].

get_gutter(window_type)
Parameters:

window_type (Gtk.TextWindowType) – the gutter window type.

Returns:

the GtkSource.Gutter.

Return type:

GtkSource.Gutter

Returns the [class`Gutter`] object associated with window_type for self.

Only Gtk.TextWindowType.LEFT and Gtk.TextWindowType.RIGHT are supported, respectively corresponding to the left and right gutter. The line numbers and mark category icons are rendered in the left gutter.

get_highlight_current_line()
Returns:

True if the current line is highlighted.

Return type:

bool

Returns whether the current line is highlighted.

get_hover()
Returns:

a GtkSource.Hover associated with self.

Return type:

GtkSource.Hover

Gets the [class`Hover`] associated with self.

The returned object is guaranteed to be the same for the lifetime of self. Each [class`View`] object has a different [class`Hover`].

get_indent_on_tab()
Returns:

True if the selection is indented when tab is pressed.

Return type:

bool

Returns whether when the tab key is pressed the current selection should get indented instead of replaced with the \t character.

get_indent_width()
Returns:

indent width.

Return type:

int

Returns the number of spaces to use for each step of indent.

See [method`View`.set_indent_width] for details.

get_indenter()
Returns:

a GtkSource.Indenter or None

Return type:

GtkSource.Indenter or None

Gets the [property`View`:py:data::indenter<GtkSource.View.props.indenter>] property.

get_insert_spaces_instead_of_tabs()
Returns:

True if spaces are inserted instead of tabs.

Return type:

bool

Returns whether when inserting a tabulator character it should be replaced by a group of space characters.

get_mark_attributes(category, priority)
Parameters:
  • category (str) – the category.

  • priority (int) – place where priority of the category will be stored.

Returns:

GtkSource.MarkAttributes for the category. The object belongs to self, so it must not be unreffed.

Return type:

GtkSource.MarkAttributes

Gets attributes and priority for the category.

get_right_margin_position()
Returns:

the position of the right margin.

Return type:

int

Gets the position of the right margin in the given self.

get_show_line_marks()
Returns:

True if the line marks are displayed.

Return type:

bool

Returns whether line marks are displayed beside the text.

get_show_line_numbers()
Returns:

True if the line numbers are displayed.

Return type:

bool

Returns whether line numbers are displayed beside the text.

get_show_right_margin()
Returns:

True if the right margin is shown.

Return type:

bool

Returns whether a right margin is displayed.

get_smart_backspace()
Returns:

True if smart Backspace handling is enabled.

Return type:

bool

Returns True if pressing the Backspace key will try to delete spaces up to the previous tab stop.

get_smart_home_end()
Returns:

a GtkSource.SmartHomeEndType value.

Return type:

GtkSource.SmartHomeEndType

Returns a [enum`SmartHomeEndType`] end value specifying how the cursor will move when HOME and END keys are pressed.

get_space_drawer()
Returns:

the GtkSource.SpaceDrawer associated with self.

Return type:

GtkSource.SpaceDrawer

Gets the [class`SpaceDrawer`] associated with self.

The returned object is guaranteed to be the same for the lifetime of self. Each [class`View`] object has a different [class`SpaceDrawer`].

get_tab_width()
Returns:

width of tab.

Return type:

int

Returns the width of tabulation in characters.

get_visual_column(iter)
Parameters:

iter (Gtk.TextIter) – a position in self.

Returns:

the visual column at iter.

Return type:

int

Determines the visual column at iter taking into consideration the [property`View`:py:data::tab-width<GtkSource.View.props.tab_width>] of self.

indent_lines(start, end)
Parameters:

Inserts one indentation level at the beginning of the specified lines. The empty lines are not indented.

push_snippet(snippet, location)
Parameters:

Inserts a new snippet at location

If another snippet was already active, it will be paused and the new snippet will become active. Once the focus positions of snippet have been exhausted, editing will return to the previous snippet.

set_auto_indent(enable)
Parameters:

enable (bool) – whether to enable auto indentation.

If True auto-indentation of text is enabled.

When Enter is pressed to create a new line, the auto-indentation inserts the same indentation as the previous line. This is **not** a “smart indentation” where an indentation level is added or removed depending on the context.

set_background_pattern(background_pattern)
Parameters:

background_pattern (GtkSource.BackgroundPatternType) – the GtkSource.BackgroundPatternType.

Set if and how the background pattern should be displayed.

set_enable_snippets(enable_snippets)
Parameters:

enable_snippets (bool) – if snippets should be enabled

Sets the [property`View`:py:data::enable-snippets<GtkSource.View.props.enable_snippets>] property.

If enable_snippets is True, matching snippets found in the [class`SnippetManager`] may be expanded when the user presses Tab after a word in the [class`View`].

set_highlight_current_line(highlight)
Parameters:

highlight (bool) – whether to highlight the current line.

If highlight is True the current line will be highlighted.

set_indent_on_tab(enable)
Parameters:

enable (bool) – whether to indent a block when tab is pressed.

If True, when the tab key is pressed when several lines are selected, the selected lines are indented of one level instead of being replaced with a \t character. Shift+Tab unindents the selection.

If the first or last line is not selected completely, it is also indented or unindented.

When the selection doesn’t span several lines, the tab key always replaces the selection with a normal \t character.

set_indent_width(width)
Parameters:

width (int) – indent width in characters.

Sets the number of spaces to use for each step of indent when the tab key is pressed.

If width is -1, the value of the [property`View`:py:data::tab-width<GtkSource.View.props.tab_width>] property will be used.

The [property`View`:py:data::indent-width<GtkSource.View.props.indent_width>] interacts with the [property`View`:py:data::insert-spaces-instead-of-tabs<GtkSource.View.props.insert_spaces_instead_of_tabs>] property and [property`View`:py:data::tab-width<GtkSource.View.props.tab_width>]. An example will be clearer:

If the [property`View`:py:data::indent-width<GtkSource.View.props.indent_width>] is 4 and [property`View`:py:data::tab-width<GtkSource.View.props.tab_width>] is 8 and [property`View`:py:data::insert-spaces-instead-of-tabs<GtkSource.View.props.insert_spaces_instead_of_tabs>] is False, then pressing the tab key at the beginning of a line will insert 4 spaces. So far so good. Pressing the tab key a second time will remove the 4 spaces and insert a \t character instead (since [property`View`:py:data::tab-width<GtkSource.View.props.tab_width>] is 8). On the other hand, if [property`View`:py:data::insert-spaces-instead-of-tabs<GtkSource.View.props.insert_spaces_instead_of_tabs>] is True, the second tab key pressed will insert 4 more spaces for a total of 8 spaces in the [class`Gtk`.TextBuffer].

The test-widget program (available in the GtkSource.View repository) may be useful to better understand the indentation settings (enable the space drawing!).

set_indenter(indenter)
Parameters:

indenter (GtkSource.Indenter or None) – a GtkSource.Indenter or None

Sets the indenter for self to indenter.

Note that the indenter will not be used unless GtkSource.View :auto-indent has been set to True.

set_insert_spaces_instead_of_tabs(enable)
Parameters:

enable (bool) – whether to insert spaces instead of tabs.

If True a tab key pressed is replaced by a group of space characters.

Of course it is still possible to insert a real \t programmatically with the [class`Gtk`.TextBuffer] API.

set_mark_attributes(category, attributes, priority)
Parameters:

Sets attributes and priority for the category.

set_right_margin_position(pos)
Parameters:

pos (int) – the width in characters where to position the right margin.

Sets the position of the right margin in the given self.

set_show_line_marks(show)
Parameters:

show (bool) – whether line marks should be displayed.

If True line marks will be displayed beside the text.

set_show_line_numbers(show)
Parameters:

show (bool) – whether line numbers should be displayed.

If True line numbers will be displayed beside the text.

set_show_right_margin(show)
Parameters:

show (bool) – whether to show a right margin.

If True a right margin is displayed.

set_smart_backspace(smart_backspace)
Parameters:

smart_backspace (bool) – whether to enable smart Backspace handling.

When set to True, pressing the Backspace key will try to delete spaces up to the previous tab stop.

set_smart_home_end(smart_home_end)
Parameters:

smart_home_end (GtkSource.SmartHomeEndType) – the desired behavior among GtkSource.SmartHomeEndType.

Set the desired movement of the cursor when HOME and END keys are pressed.

set_tab_width(width)
Parameters:

width (int) – width of tab in characters.

Sets the width of tabulation in characters.

The Gtk.TextBuffer still contains \t characters, but they can take a different visual width in a [class`View`] widget.

unindent_lines(start, end)
Parameters:

Removes one indentation level at the beginning of the specified lines.

do_line_mark_activated(iter, button, state, n_presses) virtual
Parameters:
do_move_lines(down) virtual
Parameters:

down (bool) –

do_move_words(step) virtual
Parameters:

step (int) –

do_push_snippet(snippet, location) virtual
Parameters:

Inserts a new snippet at location

If another snippet was already active, it will be paused and the new snippet will become active. Once the focus positions of snippet have been exhausted, editing will return to the previous snippet.

do_show_completion() virtual

Signal Details

GtkSource.View.signals.change_case(view, case_type)
Signal Name:

change-case

Flags:

RUN_LAST, ACTION

Parameters:

Keybinding signal to change case of the text at the current cursor position.

GtkSource.View.signals.change_number(view, count)
Signal Name:

change-number

Flags:

RUN_LAST, ACTION

Parameters:
  • view (GtkSource.View) – The object which received the signal

  • count (int) – the number to add to the number at the current position

Keybinding signal to edit a number at the current cursor position.

GtkSource.View.signals.join_lines(view)
Signal Name:

join-lines

Flags:

RUN_LAST, ACTION

Parameters:

view (GtkSource.View) – The object which received the signal

Keybinding signal to join the lines currently selected.

GtkSource.View.signals.line_mark_activated(view, iter, button, state, n_presses)
Signal Name:

line-mark-activated

Flags:

RUN_LAST

Parameters:

Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter).

You can use iter to determine on which line the activation took place.

GtkSource.View.signals.move_lines(view, down)
Signal Name:

move-lines

Flags:

RUN_LAST, ACTION

Parameters:

The signal is a keybinding which gets emitted when the user initiates moving a line.

The default binding key is Alt+Up/Down arrow. And moves the currently selected lines, or the current line up or down by one line.

GtkSource.View.signals.move_to_matching_bracket(view, extend_selection)
Signal Name:

move-to-matching-bracket

Flags:

RUN_LAST, ACTION

Parameters:
  • view (GtkSource.View) – The object which received the signal

  • extend_selection (bool) – True if the move should extend the selection

Keybinding signal to move the cursor to the matching bracket.

GtkSource.View.signals.move_words(view, count)
Signal Name:

move-words

Flags:

RUN_LAST, ACTION

Parameters:
  • view (GtkSource.View) – The object which received the signal

  • count (int) – the number of words to move over

The signal is a keybinding which gets emitted when the user initiates moving a word.

The default binding key is Alt+Left/Right Arrow and moves the current selection, or the current word by one word.

GtkSource.View.signals.push_snippet(view, snippet, location)
Signal Name:

push-snippet

Flags:

RUN_LAST

Parameters:
Returns:

a Gtk.TextIter

Return type:

location: Gtk.TextIter

The signal is emitted to insert a new snippet into the view.

If another snippet was active, it will be paused until all focus positions of snippet have been exhausted.

location will be updated to point at the end of the snippet.

GtkSource.View.signals.show_completion(view)
Signal Name:

show-completion

Flags:

RUN_LAST, ACTION

Parameters:

view (GtkSource.View) – The object which received the signal

The signal is a key binding signal which gets emitted when the user requests a completion, by pressing

Control + space. This will create a [class`CompletionContext`] with the activation type as GtkSource.CompletionActivation.USER_REQUESTED.

Applications should not connect to it, but may emit it with [func`GObject`.signal_emit_by_name] if they need to activate the completion by another means, for example with another key binding or a menu entry.

GtkSource.View.signals.smart_home_end(view, iter, count)
Signal Name:

smart-home-end

Flags:

RUN_LAST

Parameters:

Emitted when a the cursor was moved according to the smart home end setting.

The signal is emitted after the cursor is moved, but during the [signal`Gtk`.TextView::move-cursor] action. This can be used to find out whether the cursor was moved by a normal home/end or by a smart home/end.

Property Details

GtkSource.View.props.auto_indent
Name:

auto-indent

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to enable auto indentation

GtkSource.View.props.background_pattern
Name:

background-pattern

Type:

GtkSource.BackgroundPatternType

Default Value:

GtkSource.BackgroundPatternType.NONE

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Draw a specific background pattern on the view.

GtkSource.View.props.completion
Name:

completion

Type:

GtkSource.Completion

Default Value:

None

Flags:

READABLE

The completion object associated with the view

GtkSource.View.props.enable_snippets
Name:

enable-snippets

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found in [class`SnippetManager`].

The user may tab through focus-positions of the snippet if any are available by pressing Tab repeatedly until the desired focus position is selected.

GtkSource.View.props.highlight_current_line
Name:

highlight-current-line

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to highlight the current line

GtkSource.View.props.indent_on_tab
Name:

indent-on-tab

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to indent the selected text when the tab key is pressed

GtkSource.View.props.indent_width
Name:

indent-width

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Width of an indentation step expressed in number of spaces.

GtkSource.View.props.indenter
Name:

indenter

Type:

GtkSource.Indenter

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The property is a [iface`Indenter`] to use to indent as the user types into the [class`View`].

GtkSource.View.props.insert_spaces_instead_of_tabs
Name:

insert-spaces-instead-of-tabs

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to insert spaces instead of tabs

GtkSource.View.props.right_margin_position
Name:

right-margin-position

Type:

int

Default Value:

80

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Position of the right margin.

GtkSource.View.props.show_line_marks
Name:

show-line-marks

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to display line mark pixbufs

GtkSource.View.props.show_line_numbers
Name:

show-line-numbers

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to display line numbers

GtkSource.View.props.show_right_margin
Name:

show-right-margin

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to display the right margin.

GtkSource.View.props.smart_backspace
Name:

smart-backspace

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether smart Backspace should be used.

GtkSource.View.props.smart_home_end
Name:

smart-home-end

Type:

GtkSource.SmartHomeEndType

Default Value:

GtkSource.SmartHomeEndType.DISABLED

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Set the behavior of the HOME and END keys.

GtkSource.View.props.space_drawer
Name:

space-drawer

Type:

GtkSource.SpaceDrawer

Default Value:

None

Flags:

READABLE

The [class`SpaceDrawer`] object associated with the view.4

GtkSource.View.props.tab_width
Name:

tab-width

Type:

int

Default Value:

8

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Width of a tab character expressed in number of spaces.