Sunday, September 5, 2010

Re: highlight lines longer than 80 chars for a specific file types.

This thing works for me. I am a COBOL developer and have to take care of columns. Is there away to ignore comments even if they cross the specified column?

Thanks
Vivek Bhat


On Sun, Sep 5, 2010 at 4:47 AM, bill lam <cbill.lam@gmail.com> wrote:
Сбт, 04 Сен 2010, Reuven Sayag писал(а):
> Hi,
> I would like to highlight lines that are longer then 80 chars.
> I use:
> :match ErrorMsg '\%>80v.\+'
> the problem is that I only want to do that for cpp and h files, to set
> if for 100 for java and to unset it for any other type.
> Anyone knows how this can be done?

try (untest):

au FileType cpp       match ErrorMsg '\%>80v.\+'
au FileType java      match ErrorMsg '\%>100v.\+'

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

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

Post a Comment