Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461314 - app-editors/vim-core - vimrc autocmd violates global options
Summary: app-editors/vim-core - vimrc autocmd violates global options
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Oskari Pirhonen
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-03-10 23:19 UTC by ujihisa
Modified: 2023-02-10 04:28 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for files/vimrc-r3 (vimrc-r3.patch,849 bytes, patch)
2013-03-10 23:21 UTC, ujihisa
Details | Diff
patch for files/vimrc-r4 (vimrc-r4.patch,1.26 KB, patch)
2013-03-10 23:21 UTC, ujihisa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ujihisa 2013-03-10 23:19:16 UTC
files/vimrc-r[34], which eventually become /etc/vim/vimrc, have "set" in autocmd FileType, BufRead, and BufNewFile. Unless they use "setlocal" instead of "set", the option values dynamically change globally that users don't expect.

Reproducible: Always

Steps to Reproduce:
1. write "set shiftwidth=2" in your ~/.vimrc
2. open a file ends with .ebuild. ":echo &sw" will be 4 which is fine.
3. open another buffer like by ":new"
4. ":echo &sw"
Actual Results:  
4

Expected Results:  
2
Comment 1 ujihisa 2013-03-10 23:21:14 UTC
Created attachment 341620 [details, diff]
patch for files/vimrc-r3
Comment 2 ujihisa 2013-03-10 23:21:38 UTC
Created attachment 341622 [details, diff]
patch for files/vimrc-r4
Comment 3 ujihisa 2013-03-10 23:21:59 UTC
the patches attached should solve this issue.