Permalink
a7564dd May 16, 2018
@mitya57 @xgouchet @starofrainnight @mray271
103 lines (85 sloc) 6.26 KB

ReText stores all of its configuration in a text file. A path to that file is printed to stdout during ReText startup.

Possible configuration options

Configuration options that you can set to improve your experience:

option name type description
appStyleSheet file path file containing a Qt stylesheet file
autoSave boolean whether to automatically save documents (default: false)
defaultCodec string name of encoding to use by default (default: use system encoding)
defaultMarkup string name of markup to use for unknown files
detectEncoding boolean whether to automatically detect files encoding; needs chardet package (default: true)
documentStatsEnabled boolean whether to show document stats (word count, character count) (default: false)
editorFont string font to use for editor: name (default: monospace)
editorFontSize integer font to use for editor: font size
font string font to use for previews: name
fontSize integer font to use for previews: font size
handleWebLinks boolean whether to use ReText preview area to open external links (default: false)
hideToolBar boolean whether to hide the toolbars from the UI (default: false)
highlightCurrentLine boolean whether to highlight current line in editor (default: false)
iconTheme string name of the system icon theme to use (see below)
lineNumbersEnabled boolean whether to show column with line numbers in editor (default: false)
livePreviewByDefault boolean whether new tabs and windows should open in live preview mode (default: false)
markdownDefaultFileExtension string default file extension for Markdown files (default: .mkd)
openLastFilesOnStartup boolean whether to automatically open last documents on startup (default: false)
paperSize string name of default page size to use for print and export (e.g. A4, Letter)
pygmentsStyle string name of Pygments syntax highlighting style to use (default: default)
relativeLineNumbers boolean whether to show line numbers as relative from the current line (default: false)
restDefaultFileExtension string default file extension for reStructuredText files (default: .rst)
rightMargin integer enable drawing of vertical line on defined position (or 0 to disable)
saveWindowGeometry boolean whether to restore window geometry from previous session (default: false)
spellCheck boolean whether to enable spell checking
spellCheckLocale string short name of spell check locale to use (examples: en_US, ru, pt_BR)
styleSheet file path CSS file to use in preview area
syncScroll boolean whether to enable synchronized scrolling for Markdown (default: true)
tabBarAutoHide boolean whether to hide the tabs bar when only one tab is open (default: false)
tabInsertsSpaces boolean whether Tab key should insert spaces instead of tabs (default: true)
tabWidth integer the width of tab character (default: 4)
uiLanguage string short name of locale to use for interface (examples: en_US,ru, pt_BR)
useFakeVim boolean whether to use the FakeVim editor, if available (default: false)
useWebEngine boolean whether to use the WebEngine (Chromium) as HTML previewer (default: false)
useWebKit boolean whether to use the WebKit instead of QTextEdit as HTML previewer (default: false)

If the type is 'file path', then the value should be an absolute path to a file.

These options can be set internally by ReText and should never be set manually: recentFileList, lastFileList, lastTabIndex and windowGeometry.

Icon themes

If ReText starts and does not show icons, go to Preferences dialog and fill the "icon theme" field with the icon theme being used.

By default Qt (the toolkit used by ReText) can correctly detect icon theme only on KDE and on a fixed list of Gtk+-based environments (when the gtk platformtheme is used).

If you don't know name of your icon theme, look at the names of subdirectories in /usr/share/icons/ directory.

Color scheme setting

It is possible to configure ReText highlighter to use custom colors set, by providing these colors in a separate section in the configuration file.

The example of such section is:

[ColorScheme]
htmlTags=green
htmlSymbols=#ff8800
htmlComments=#abc

Color names for the text editor:

color name main setting description
marginLine rightMargin the vertical right margin line
currentLineHighlight highlightCurrentLine highlighting of the text line being edited
infoArea the info box in the bottom-right corner
lineNumberArea lineNumbersEnabled the line numbers area background
lineNumberAreaText lineNumbersEnabled the line numbers area foreground

Color names for the highlighter:

color name description
htmlTags HTML tags, e.g. <foo>
htmlStrings string properties inside HTML tags, e.g. "baz" inside <foo bar="baz">
htmlSymbols HTML symbols, e.g. &bar;
htmlComments HTML comments, e.g. <!-- comment -->
markdownLinks Markdown links and images text, e.g. foo inside [foo](http://example.com)
blockquotes blockquotes, e.g. > quote in Markdown
codeSpans code spans, e.g. `code` in Markdown
restDirectives reStructuredText directives, e.g. .. math::
restRoles reStructuredText roles, e.g. :math:
whitespaceOnEnd whitespace at line endings