Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Jumping to matching keywords with % in Vim
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-11-17 (11:29)
From: Issac Trotts <ijtrotts@n...>
Subject: [Caml-list] Jumping to matching keywords with % in Vim
For those who use Vim and have the matchit.vim plugin installed,
here are a few lines to put in $HOME/.vim/ftplugin/ocaml.vim :

let b:mw='\<let\>:\<and\>:\(\<in\>\|;;\),'
let b:mw=b:mw . '\<if\>:\<then\>:\<else\>,\<do\>:\<done\>,'
let b:mw=b:mw . '\<\(object\|sig\|struct\|begin\)\>:\<end\>'
let b:match_words=mw

Then the percent key jumps between begin...end,, etc.  

The only problem I've encountered with it is that it doesn't
go back to 'if' from 'then' when the 'else' clause is missing.
If someone knows how to fix this, I'd like to know.

Issac Trotts
Center for Neuroscience
University of California, Davis 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: