I find I spend quite some time editing wiki pages, such as the Haskell.org wiki. However, browser-based
editing leaves a lot to be desired, generally making the editing process
more inefficient and difficult than it needs to be. I suspect that these
inefficiencies hamper contributions, especially in longer texts.
The main problem with wiki editing is the browser-based editor forms
aren't proper editors, so you're just wasting your time using them.
Key missing features are:
- Syntax highlighting
- Regular expressions substitutions
- Spell checking
- Programming tool support (particular for a PL wiki like Haskell.org)
We can fill these holes, and improve efficiency, by using the text-based
browser w3m along
with your favourite text editor, which for me is Vim. w3m is a simple,
fast, terminal browser, which uses an external editor by default, for
editing online forms.
Syntax highlighting for wiki files, with embedded Haskell, and Vim is available
here. Save this to your ~/.vim/syntax directory, and
enable it dynamically when editing online with :setf haskellwiki.
Using your favourite editor from w3m is as simple as setting:
editor: vim -c "setf haskellwiki"
in the w3m configuration screen (type o in w3m to bring
this up). This also enables syntax highlighting by default, including
Haskell fragments embedded in "<haskell>" tags.
And of course, vim being vim, you have access to unix tools via the
shell (such as aspell), programming tools like lambdabot (pointfree refactoring of
wiki code, anyone?) and more.
More
details on text editor support for wiki editing, from a variety of
browsers. Thanks to jgrimes for advice on this.
Finally, for the future, I'd like to investigate a generic mechanism for
exporting wiki pages to a local revision control system, such as darcs. For large wiki subsections I work on, I
currently save files locally in a new darcs repository, edit them, then
upload the subsection in a single pass when complete. This is tedious --
power users should always have a revision control back end to the wiki,
for pushing and pulling changes directly. This is the way this blog is
published: developed in a local darcs repository, and then pushed to a
public repository, which blosxom
then renders. Ideally, preparing wiki articles too should involve only
the editor and a revision control system, for publishing.
/home ::
/net ::
permalink ::
rss
2006-09-11
Hot on the tail of Andrew Bromage's free theorems
plugin for Lambdabot, we now have two free theorem generators, thanks to
Janis Voigtlaender and Sascha Boehme's FT tool.
lambdabot> ft map
forall T1,T2 in TYPES. forall h1 :: T1 -> T2, h1 strict.
forall T3,T4 in TYPES. forall h2 :: T3 -> T4, h2 strict.
forall f1 :: T1 -> T3.
forall g1 :: T2 -> T4.
(forall x2 :: T1.
h2 (f1 x2) = g1 (h1 x2))
==> forall x1 :: [T1].
map h2 (t1 f1 x1) = t1 g1 (map h1 x1)
lambdabot> ft foldl1
forall T1,T2 in TYPES. forall h1 :: T1 -> T2, h1 strict.
forall f1 :: T1 -> T1 -> T1.
forall g1 :: T2 -> T2 -> T2.
(forall x2 :: T1.
forall x3 :: T1.
h1 (f1 x2 x3) = g1 (h1 x2) (h1 x3))
==> forall x1 :: [T1].
h1 (t1 f1 x1) = t1 g1 (map h1 x1)
/home ::
/haskell ::
permalink ::
rss
2006-09-04