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:
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!!!