Skip to content

Inserting Literal Tabs ​

Insertion of TAB characters can be as simple or as complex as you like. The simplest technique is to use {C-q TAB} whenever you want to insert a TAB character.

If you don’t use the {TAB} key for tree demotion or visibility cycling and prefer that it always indent the current line or insert a TAB character, then set the variable, kotl-mode:tab-flag to ‘t’. {S-TAB} then will delete backward either one or the number of characters given by the prefix argument.

If you prefer that the {TAB} key runs kotl-mode:indent-line (typically inserting a TAB character) only in certain contexts, as it does in Org mode, then change the value of the variable, kotl-mode:emulate-tab, from its default ‘nil’ value.

Its possible values are:

‘nil’ ​

Never call kotl-mode:indent-line

‘white’ ​

Only in completely white lines

‘whitestart’ ​

Only at the beginning of lines, before the first non-white character

‘t’ ​

Everywhere except in the first line of cells

‘exc-hl-bol’ ​

Everywhere except at the start of a cell

In contexts where the {TAB} key inserts a TAB character, you have the option of having it insert spaces instead. Set the variable, kotl-mode:indent-tabs-mode, to ‘nil’.