Tuesday, January 29, 2013

Re: "shift+%" not working in newtab

On Tue, Jan 29, 2013 at 12:11 PM, Ben Fritz <fritzophrenic@gmail.com> wrote:
On Tuesday, January 29, 2013 3:57:11 AM UTC-6, ali jaan wrote:
> I added some commands in .vimrc
>
> source ~/vimfiles/matchit.vim
>
> let b:match_words =
>
> '\<begin\>:\<end\>,'.'\<class\>:\<endclass\>,'.'\<task\>:\<endtask\>,'.'\<case\>:\<endcase\>'

b:match_words is a buffer-local variable, as indicated by the b: prefix.

If you want to set b:match_words on every file of a given filetype, you want to use a FileType autocmd or a custom ftplugin or after/ftplugin file.

:help internal-variables
  (or :help b:var)
:help :autocmd
:help filetype

     Those are good references, but you might skip a few paragraphs and go to

:help :filetype-plugin-on

What type of file are you editing?  Chances are that vim already has an ftplugin with matchit support.  If so, then all you have to do is add

:filetype-plugin-on

to your vimrc file.

     Historical note:  when filetype plugins were first added to vim, Dan Sharp contributed several of them that did little more than add configuration for matchit.

HTH  --Benji Fisher
(For once I remembered not to top-post when using the Gmail web interface!)

--
--
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
 
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment