Skip to content

Commit

Permalink
Added file type and tabs documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pistos committed Oct 16, 2008
1 parent 4192140 commit 837f064
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
24 changes: 24 additions & 0 deletions help/file-type.dhf
@@ -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
23 changes: 23 additions & 0 deletions help/tabs.dhf
@@ -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

0 comments on commit 837f064

Please sign in to comment.