Bug 84088

Summary: obnoxious autocmds in system vimrc
Product: [Retired] Red Hat Linux Reporter: Andrew Pimlott <redhat-bugzilla>
Component: vimAssignee: Karsten Hopp <karsten>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
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: 2003-02-12 12:34:00 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 Andrew Pimlott 2003-02-12 01:44:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
The autocmds

    autocmd FileType *      set formatoptions=tcql nocindent comments&
    autocmd FileType c,cpp  set formatoptions=croql cindent
comments=sr:/*,mb:*,el:*/,://

in /usr/share/vim/vim61/macros/vimrc are quite inconsiderate.  In the first
place, they override a user configuration.  If a user sets formatoptions, it
will be entirely ignored for all files!  In the second place, if you must do
such things, do them in the ftplugins where they belong.  Actually, most of this
stuff is already in the c and cpp ftplugins, so it's only duplication.

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


How reproducible:
Always

Steps to Reproduce:
1. VIMINIT='set formatoptions=' vi foo.sh
2. :set formatoptions
3.
    

Actual Results:  formatoptions=tcql

Expected Results:  formatoptions=

Additional info:

Comment 1 Steve Coile 2003-06-02 15:17:46 UTC
This is still a problem in RHL 9.  There are numerous configuration changes made
in /usr/share/vim/vim61/macros/vimrc that will override the user's .vimrc. 
Further, there is no *** EASY *** way for users to work around the system vimrc.
 It would take a considerable amount of time reading vim's on-line help (in it's
esoteric and difficult-to-use help browser) to figure out how to use the
"autocmd" commands effectively enough to, for instance, disable the setting of
the "textwidth" variable when a plain text file is opened.

DO NOT PRESUME TO KNOW HOW THE USER WANTS THEIR FILES FORMATTED!!!