Jorge Almeida wrote:
On Tue, 5 Sep 2006, A.J.Mechelynck wrote:

The gentoo package managing system need not be aware of your own-compiled Vim,
any more that my SuSE package managing system is aware of my Vim 7.0.83 (e.g.,
it won't list it if I do "rpm -qa |grep vim").

But I suppose I would need to recompile vim due to changes in the gentoo
system (e.g., after upgrading gcc/glibc)?
[...]

If you upgrade the compiler, there should be no need to recompile everything immediately, unless it doesn't work with the new libraries. The next time there are _vim_ bugfixes, you ought to be able to use the new version of the compiler with no trouble. The only thing is, if you install or uninstall any packages that Vim uses (just as you would do if you change your configuration settings), you should run "make reconfig" in the src/ subdirectory to make sure that the configure cache is voided and that your configuration settings are checked against the new state of your software.

    796         for ([EMAIL PROTECTED]){
    797                 $heavy{$light[$_-1]}{$numbers[$_-1]}=$heavy[$_-1];
    798         }
It doesn't. After pasting into an empty buffer via the clipboard,
block-deleting the column of numbers (from the left margin up to, but not
including, the s in "sub" at top and the last } at bottom) and setting
'filetype' to perl, I see all reserved words in brown, identifiers starting @
or $ in green including a preceding backslash if present, the identifier D
also in green, strings and numbers in pink with the exception of
backslash-escaped single quotes which are in mauve, regular expressions in
pink and mauve between brown slashes, and the rest in black, all of it on a
white background (this is gvim) from top to bottom of the text. The only thing
doubtful (to me) is that, inside the double-quoted strings, ${logdir} is in
pink but $! is in green.
In version 6.4, ${logdir} appears with the same colour as the rest of
the surrounding quoted string. I think this is normal. It would be
better to make it the same colour as other variables, like $!, but the
developer probably didn't think about it.
My Vim distribution uses ftplugin/perl.vim by Dan Sharp (2005 Dec 16) and
syntax/perl.vim by Nick Hibma (2006 Aug 9).

It appears there is a bug in the syntax file (see reply by Peter Hodge).
This brings  up the question: How to install a syntax file without
poluting the distribution system? In gentoo, the file is (for version
6.4):
/usr/share/vim/vim64/syntax/perl.vim
Replacing this is not a good idea, since it would be replaced next time
I updated vim in gentoo. So, is there a way to tell vim where to look
for [some] syntax files? (Something like /usr/local/share/...)?

Drop it as $VIM/vimfiles/syntax/perl.vim (i.e., IIUC, /usr/share/vim/vimfiles/syntax/perl.vim), creating any needed directories in the process; it will then be loaded before $VIMRUNTIME/syntax/perl.vim, and the latter, seeing that a syntax script has already been loaded, should terminate early without doing anything. Of course, if someday you upgrade $VIMRUNTIME/syntax/perl.vim to something _more recent_ than $VIM/vimfiles/syntax/perl.vim, you should remove the latter manually.


And about the indenting problem? Could you check with your vim and the
above piece of code? If you place the cursor on line 796 and press 'o'
in normal mode, it should open a line with the cursor above the '$' of
"$heavy". What happened to me is that the cursor would be below the 'f'
of "for".

First, do ":filetype" with no arguments. If it says (among other things) "indent:OFF" then you're not using filetype-related indenting and you need ":filetype indent on" or ":filetype plugin indent on" somewhere in your vimrc (it can be done implicitly by sourcing $VIMRUNTIME/vimrc_example.vim).

My $VIMRUNTIME/indent/perl.vim is dated 2005 Sep 07 (by Rafael Garcia-Suarez). If yours is the same or later, IMHO you should contact the maintainer. If it is earlier, check the URI in the file's headings.


Thanks a lot.

Regards,

Jorge

Best regards,
Tony.

Reply via email to