Bug 244421

Summary: Breaks syntax highlighting and indenting in perl scripts
Product: Red Hat Enterprise Linux 5 Reporter: Klaus Ethgen <Klaus+rhbz>
Component: vimAssignee: Karsten Hopp <karsten>
Status: CLOSED WORKSFORME QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.0CC: pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-14 14:23:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Klaus Ethgen 2007-06-15 15:32:29 UTC
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
   highlighting.

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

2.
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/
perl.vim

Comment 1 Phil Knirsch 2008-04-28 13:13:12 UTC
Proposing for RHEL-5.3 and granting Devel ACK.

Read ya, Phil


Comment 5 Karsten Hopp 2009-05-14 14:23:06 UTC
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