Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added file type and tabs documentation.
- Loading branch information
Pistos
committed
Oct 16, 2008
1 parent
4192140
commit 837f064
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# File Type | ||
|
||
The language (or type) of a file is shown in the status bar between | ||
parentheses. For example, the file type of this help document is "dhf". | ||
|
||
Diakonos can usually guess a file's language correctly. To do so, it | ||
considers the filename and, if present, the "bang" line at the top of the | ||
file. The bang line takes precedence over the filename. | ||
|
||
If Diakonos was wrong in its automatic determination of the file type, you can | ||
force it to assume a certain file type by pressing <Alt-Shift-T> and typing in | ||
the file type (e.g. java, ruby, html, xml, and so on). | ||
|
||
The configuration settings (available by pressing <F12>) which affect | ||
Diakonos' guessing are a language's filemask and bangmask settings. These | ||
settings are regular expressions. For example: | ||
|
||
lang.perl.filemask \.(?:pl|pm)$ | ||
lang.perl.bangmask perl | ||
|
||
These configuration lines tell Diakonos to think a file is a Perl file if its | ||
extension is .pl or .pm, or if the bang line has the word "perl" in it. | ||
|
||
Tags: file files lang language languages programming type mode types modes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Tabs | ||
|
||
## Changing the width of tab characters | ||
|
||
The width of a tab character depends on the language of the file. To change | ||
the width for a specific language, change the tabsize setting for the | ||
language. For example, to change the tabsize of Ruby files, open the | ||
configuration file by pressing <F12>, and look for a line like this: | ||
|
||
lang.ruby.tabsize 2 | ||
|
||
Then change the number 2 to whatever number you desire, such as 4. | ||
|
||
## Indenting with tab characters instead of spaces | ||
|
||
By default, Diakonos indents with spaces. To make it indent with tab | ||
characters instead, look for the ident settings for the language. For | ||
example, to change the indentation of Ruby, add the following line to your | ||
configuration file (<F12>): | ||
|
||
lang.ruby.indent.using_tabs true | ||
|
||
Tags: tab tabs indent indenting indentation space spaces whitespace char character characters width size number |