You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@nodeGettingStarted, EditingCode, Introduction, Top
87
87
@chapter Getting Started
88
88
89
-
One of the recommended ways is to install Haskell Mode via the Marmalade package archive (@uref{http://marmalade-repo.org/packages/haskell-mode}).
89
+
If you are reading this, you have most likely already managed to install Haskell mode in one way or another. However, just for the record, the officially recommended way to install Haskell Mode via the @uref{http://marmalade-repo.org/packages/haskell-mode,Marmaladepackagearchive} which contains the latest stable release of Haskell Mode.
90
90
91
-
Most of Haskell Mode's settings are exposed via Emacs' @pxref{EasyCustomization,,, emacs} interface. You can use @kbd{M-xhaskell-customize} to browse the @code{haskell} customization sub-tree.
91
+
@findexhaskell-customize
92
+
Most of Haskell Mode's settings are configurable via customizable variables (@xref{EasyCustomization,,, emacs}, for details). You can use @kbd{M-xhaskell-customize} to browse the @code{haskell} customization sub-tree.
92
93
93
-
TODO:
94
-
@itemize
95
-
@item
96
-
provide basic instructions to get up and running with haskell-mode
97
-
@item
98
-
tell about the most important commands
99
-
@item
100
-
tell where to find advanced help
101
-
@end itemize
94
+
One of the important setting you should customize is the @code{haskell-mode-hook} variable (@pxref{Hooks,,, emacs}) which gets run right after the @code{haskell-mode} major mode is initialized for a buffer. You can customize @code{haskell-mode-hook} by @kbd{M-xcustomize-variable@key{RET} haskell-mode-hook}. It's highly recommended you set up indentation to match to match your preferences, @xref{Indentation}.
95
+
96
+
@c TODO:
97
+
@c provide basic instructions to get up and running with haskell-mode
98
+
@c tell about the most important commands
102
99
103
100
@nodeEditingCode, Unicode, GettingStarted, Top
104
101
@chapter Editing Code
105
102
106
-
TODO
103
+
TODO/WRITEME
107
104
108
105
@nodeUnicode, Indentation, EditingCode, Top
109
106
@chapter Unicode support
@@ -130,20 +127,38 @@ If you don't like the highlighting of partially matching tokens you can turn it
130
127
@nodeIndentation, inferior-haskell-mode, Unicode, Top
131
128
@chapter Indentation
132
129
133
-
@findexturn-on-haskell-indent
134
-
@findexturn-on-haskell-indentation
135
-
@findexturn-on-haskell-simple-indent
136
130
@cindexindentation
137
131
138
-
TODO:
139
-
@itemize
140
-
@item
141
-
tell about the three available basic indentation modules
142
-
@item
143
-
tell about the import sorting/alignment modules
144
-
@item
145
-
tell about customizations
146
-
@end itemize
132
+
Three Haskell indentation schemes are included in Haskell mode:
133
+
134
+
@ftable@code
135
+
136
+
@item turn-on-haskell-simple-indent
137
+
138
+
A very simple indentation scheme; In this scheme, @key{TAB} will now move the cursor to the next indent point in the previous nonblank line. An indent point is a non-whitespace character following whitespace.
139
+
140
+
@item turn-on-haskell-indent
141
+
142
+
Intelligent semi-automatic indentation for Haskell's layout rule. The basic idea is to have @key{TAB} cycle through possibilities indentation points based on some clever heuristics.
143
+
144
+
The rationale and the implementation principles are described in more detail the article @cite{Dynamictabbingforautomaticindentationwiththelayoutrule} published in the Journal of Functional Programming 8.5 (1998).
145
+
146
+
@item turn-on-haskell-indentation
147
+
148
+
Improved variation of @code{turn-on-haskell-indent} indentation mode. Rebinds @key{RET} and @key{DEL}, so that indentations can be set and deleted as if they were real tabs.
149
+
150
+
@end ftable
151
+
152
+
To enable one of these three mutually exclusive indentation schemes, you just need call one (and only one!) of the `turn-on-*' commands while in the buffer you want the indentation scheme to be activated for.
153
+
154
+
The recommended way is to add one of @code{turn-on-*} commands to @code{haskell-mode-hook}. This can be done either by using @kbd{M-xcustomize-variable@key{RET} haskell-mode-hook} which provides a convenient user interface or by adding @emph{one} the following three lines to your @file{.emacs} file:
0 commit comments