Bug 84088 - obnoxious autocmds in system vimrc
obnoxious autocmds in system vimrc
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: vim (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-11 20:44 EST by Andrew Pimlott
Modified: 2007-04-18 12:51 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-12 07:34:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Pimlott 2003-02-11 20:44:24 EST
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 11:17:46 EDT
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!!!

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