<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/11/bacc85928dbd73f2643743fc792e3b9b"
  from="Issac Trotts &lt;ijtrotts@n...&gt;"
  author="Issac Trotts"
  date="2003-11-17T11:29:47"
  subject="[Caml-list] Jumping to matching keywords with % in Vim"
  prev="2003/11/663dd68fbee6d9f1a5b166cb1c70b6aa"
  next="2003/11/de506728921339240e332396b864b4b2"
  next-in-thread="2003/11/77454b1dcd0bf70ae065fae653e1090a"
  prev-thread="2003/11/5d3e596b74eaa9ee75a58da8d20cd9d9"
  next-thread="2003/11/d9694c4eef770fa17289a4d313aa19c0"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Jumping to matching keywords with % in Vim">
<msg 
  url="2003/11/bacc85928dbd73f2643743fc792e3b9b"
  from="Issac Trotts &lt;ijtrotts@n...&gt;"
  author="Issac Trotts"
  date="2003-11-17T11:29:47"
  subject="[Caml-list] Jumping to matching keywords with % in Vim">
<msg 
  url="2003/11/77454b1dcd0bf70ae065fae653e1090a"
  from="Aleksey Nogin &lt;nogin@c...&gt;"
  author="Aleksey Nogin"
  date="2003-11-17T16:15:07"
  subject="Re: [Caml-list] Jumping to matching keywords with % in Vim">
<msg 
  url="2003/11/3d9cc991dadd878e66293fc2a0aa9594"
  from="Issac Trotts &lt;ijtrotts@n...&gt;"
  author="Issac Trotts"
  date="2003-11-17T16:47:54"
  subject="Re: [Caml-list] Jumping to matching keywords with % in Vim">
</msg>
</msg>
<msg 
  url="2003/11/1186588d5da72a466c3a1190d2f6937c"
  from="Stefano Zacchiroli &lt;zack@b...&gt;"
  author="Stefano Zacchiroli"
  date="2003-11-17T16:40:17"
  subject="[Caml-list] vim - switching between .ml and .mli">
</msg>
</msg>
</thread>

<contents>
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='\&lt;let\&gt;:\&lt;and\&gt;:\(\&lt;in\&gt;\|;;\),'
let b:mw=b:mw . '\&lt;if\&gt;:\&lt;then\&gt;:\&lt;else\&gt;,\&lt;do\&gt;:\&lt;done\&gt;,'
let b:mw=b:mw . '\&lt;\(object\|sig\|struct\|begin\)\&gt;:\&lt;end\&gt;'
let b:match_words=mw

Then the percent key jumps between begin...end, let...in, 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
Programmer
Center for Neuroscience
University of California, Davis 

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

