Bug 241308 - please use augroup for /etc/vimrc autocmds
please use augroup for /etc/vimrc autocmds
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: vim (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-24 19:08 EDT by Aron Griffis
Modified: 2013-04-12 15:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 578785 (view as bug list)
Environment:
Last Closed: 2009-06-22 13:27:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Aron Griffis 2007-05-24 19:08:45 EDT
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 09:05:58 EDT
Proposing for RHEL-5.3 and granting Devel ACK.

Read ya, Phil
Comment 8 errata-xmlrpc 2009-06-22 13:27:31 EDT
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.