Wednesday, December 22, 2010

Re: Using match in modeline?

On Dec 21, 7:04 pm, AMDx64BT <amdx6...@gmail.com> wrote:
> I have this command to highlight columns in my vimrc, and I would like to
> transform it to modeline:
> :au BufWinEnter *.colorize let w:m1=matchadd('ErrorMsg', '\%<39v.\%>20v',
> -1)
>
> I have tried this, but it doesn't work:
> vim:match ErrorMsg '\%<39v.\%>20v'

You cannot do anything except for set options in a modeline, for
security reasons. I believe there are plugins out there which would
allow you to do something like this, but I would not recommend them.

Instead, you could make sure you have Vim 7.3 or higher, and simply
use the colorcolumn option. This can be used in a modeline like any
other option.

It looks like you have multiple columns highlighted. What is the
purpose of this? Perhaps it is better in your .vimrc after all. Why do
you want it in a modeline anyway?

--
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

No comments: