On 14/08/12 02:38, Benjamin R. Haskell wrote:
On Sun, 12 Aug 2012, Benji Fisher wrote:
[...]
If you typed PATHTOMATCHIT literally, it would not work. I usually
recommend adding this to your vimrc file:
source $VIMRUNTIME/macros/matchit.vim
This is roughly equivalent to Tony's suggestion of:
runtime macros/matchit.vim
:runtime is almost the same as using :source and prepending $VIMRUNTIME.
But, it has the benefit of searching all 'runtimepath' directories (not
just the system directories), which makes it possible to override
system-wide versions.
There are even two variants: :runtime (with no bang) searches them in
order, sources the first one found, and stops there. :runtime! (with
bang) also searches them in order, but sources them all, which allows
small changes in after-directories but requires an "if
exists(someVariable) | finish | endif | let someVariable = someValue"
near the top of the full-fledged script so it can be overridden by
something in or under ~/.vim (for Unix), ~/vimfiles (for Windows) or
$VIM/vimfiles (for either). For matchit, this variable is called
loaded_matchit (see macros/matchit.vim dated Fri Jan 25 10:00 AM 2008
EST, lines 38-43). In addition, line 40 tells us that matchit will not
run if you start Vim in 'compatible' mode.
As a side benefit, it's shorter to type (which isn't important in a
.vimrc, but can be useful in one-off's).
Best regards,
Tony.
--
Dessert is probably the most important stage of the meal, since it will
be the last thing your guests remember before they pass out all over
the table.
-- The Anarchist Cookbook
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php