From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA32653; Mon, 17 Nov 2003 12:29:47 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA32230 for ; Mon, 17 Nov 2003 12:29:46 +0100 (MET) Received: from manzanita ([128.120.141.214]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAHBTj123760 for ; Mon, 17 Nov 2003 12:29:45 +0100 (MET) Received: from ijtrotts by manzanita with local (Exim 3.36 #1 (Debian)) id 1ALhaQ-0000kM-00 for ; Mon, 17 Nov 2003 03:30:30 -0800 Date: Mon, 17 Nov 2003 03:30:30 -0800 To: caml-list@inria.fr Subject: [Caml-list] Jumping to matching keywords with % in Vim Message-ID: <20031117113030.GA2649@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i From: Issac Trotts X-Loop: caml-list@inria.fr X-Spam: no; 0.00; issac:01 trotts:01 ijtrotts:01 struct:01 'if':99 issac:01 trotts:01 davis:99 ocaml:01 center:98 sig:01 vim:01 vim:01 plugin:02 match:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 b:mw=b:mw . '\:\:\,\:\,' let b:mw=b:mw . '\<\(object\|sig\|struct\|begin\)\>:\' 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