Bug 244421 - Breaks syntax highlighting and indenting in perl scripts
Breaks syntax highlighting and indenting in perl scripts
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: vim (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Karsten Hopp
Depends On:
  Show dependency treegraph
Reported: 2007-06-15 11:32 EDT by Klaus Ethgen
Modified: 2013-04-12 15:11 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-14 10:23:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Klaus Ethgen 2007-06-15 11:32:29 EDT
Description of problem:

Redhat did backport too much in vim 7.0 from the upstream vim 7.1. So two
thinks are wrong:

1. The indenting doesn't work any more in perl scripts
2. Regular expressions like m#...$# are not matched successful for syntax

Version-Release number of selected component (if applicable):
7.0 (Backports from 7.1 as the version 7.0 from upstream is correct)

How reproducible:
Put the following two lines in your .vimrc:
   set ai
   filetype indent on

edit a new perl file (vim test.pl) and write the following:
while (1)

If you press return after the '{' your cursor should be in the column specified
by shiftwidth (normaly column 8). But your cursor is on column 1.

Just use a regex descripted above.

Additional info:
This can be fixed with the following two sed commands:
1. sed -i -e 's/perlBlockFold/perlIfFold/' /usr/share/vim/vim70/syntax/perl.vim
2. sed -i -e '/perlVarPlain/s/=%~!?@#\$/=%~?@$/' /usr/share/vim/vim70/syntax/
Comment 1 Phil Knirsch 2008-04-28 09:13:12 EDT
Proposing for RHEL-5.3 and granting Devel ACK.

Read ya, Phil
Comment 5 Karsten Hopp 2009-05-14 10:23:06 EDT
There is no patch in RHEL-5 vim that changes anything in perl.vim

re. 1)  I just did a fresh install of 5.3 and wrote a .vimrc with the suggested 
        2 lines and edited a new file called test.pl.
        The line after '{' was indented as expected, your patch isn't required 
        at all.
        Please check /etc/vimrc, $HOME/.vimrc and $HOME/.vim/* for anything 
        that changes the default behaviour

re. 2)  m and $ regex looks ok to me, too. I can't reproduce this problem.
       Please reopen this bugzilla with a precise testcase if the problem
       is reproducable with an unmodified vimrc and no files in $HOME/.vim

Note You need to log in before you can comment on or make changes to this bug.