Skip to content
This repository has been archived by the owner on Nov 4, 2019. It is now read-only.

Configuration and customization

rsms edited this page Jan 4, 2011 · 23 revisions

Configuration and customization

This article documents how Kod can be customized using different configurations.

Manipulating settings:

Currently Kod does not provide any interface for manipulating settings so you will need to use the defaults tool.

Example of changing or adding a setting:

defaults write se.hunch.kod groupNewDocuments/enabled -bool NO

Example of removing a setting, effectively causing Kod to use it's built-in default:

defaults delete se.hunch.kod groupNewDocuments/enabled

See man defaults for details on how to use the defaults tool.

User interface

Type Name Default value Description
bool groupNewDocuments/enabled YES Enable or disable automatic grouping of new documents
bool groupNewDocuments/byEditDistance YES When using automatic grouping of new documents, employ edit-distance to find "fuzzy" matches
bool window/newTabButton/enable NO Enables a button which appear to the right of the last tab in the tab strip. When clicked, it adds a new tab. Note that enabling this reduces the amount of space available to display tabs in the tab strip.
number window/splitView/position 180.0 Position (or width of the sidebar) split view when not collapsed.
bool window/splitView/collapsed YES Toggle visibility of the left sidebar. Note: This setting is currently ignored when creating new windows and forced to YES when opening a file directory.
bool window/statusBar/hidden NO Toggle visibility of the status bar at the bottom of the window.

Text editor

Type Name Default value Description
string editor/text/indentation 2×SP A string which is used when adding or removing indentations
string editor/text/newline "\n" Inserted to terminate new lines
bool editor/indent/newline YES Controls whether Kod performs "magic" when inserting new lines (namely retaining the previous indentation level or not).
bool editor/indent/tabkey YES Enables translating a TAB key press into indentation adjustment. When enabled, using the Shift key modifier decreases the indentation level and holding the Alt key modifier inserts a regular tab character. If disabled, pressing TAB inserts a regular tab character.
bool editor/metaRuler/hidden NO Toggle visibility of the "ruler" (the thing with line numbers). Note: When setting the hasMetaRuler property of a document, this setting is changed to the (inverted) value. Also to be noted is that altering this setting only have an effect on new documents (use the hasMetaRuler property of a current document to toggle the ruler of that document).

Style

Type Name Default value Description
string style/url {Kod.app}/Contents/Resources/style/default.css URL of the current style.

Reading and writing files (KFileURLHandler)

Type Name Default value Description
bool KFileURLHandler/write/atomic NO Enables "atomic writes" -- writing the file to a temporary location and upon success, hard-re-linking the target filename to the new data written.
bool KFileURLHandler/write/async YES Enables asynchronous writing of files. When enabled, e.g. pressing Cmd+S will make a snapshot of the documents data and then defer the write operation in a background thread. If disabled, the user interface will block during the duration of writing data to disk. If you are saving files to mounted remote file systems, it's not recommended to disable this.
Clone this wiki locally