Bug 241308 - please use augroup for /etc/vimrc autocmds
Summary: please use augroup for /etc/vimrc autocmds
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: vim
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Karsten Hopp
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-24 23:08 UTC by Aron Griffis
Modified: 2021-06-29 08:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 578785 (view as bug list)
Environment:
Last Closed: 2009-06-22 17:27:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1117 0 normal SHIPPED_LIVE vim bug fix update 2009-06-22 17:27:19 UTC

Description Aron Griffis 2007-05-24 23:08:45 UTC
Description of problem:
There's no way for the user to cleanly remove the RH-provided autocmds.

Version-Release number of selected component (if applicable):
7.0.109-3

How reproducible:
always

Steps to Reproduce:
1. edit ~/.vimrc
2. attempt to remove RH-provided autocmds
3. best you can do is remove all autocmds using autocmd!, not ideal
  
Additional info:
This would fix it...

--- /etc/vimrc.old      2006-09-28 23:05:34.000000000 -0400
+++ /etc/vimrc  2007-05-24 19:08:12.000000000 -0400
@@ -13,6 +13,8 @@

 " Only do this part when compiled with support for autocommands
 if has("autocmd")
+ augroup redhat
+  autocmd!
   " In text files, always limit the width of text to 78 characters
   autocmd BufRead *.txt set tw=78
   " When editing a file, always jump to the last cursor position
@@ -20,6 +22,7 @@
   \ if line("'\"") > 0 && line ("'\"") <= line("$") |
   \   exe "normal! g'\"" |
   \ endif
+ augroup END
 endif

 if has("cscope") && filereadable("/usr/bin/cscope")

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

Read ya, Phil


Comment 8 errata-xmlrpc 2009-06-22 17:27:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1117.html


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