Bug 1330587 - RFE: place for per-host, per-user vimrc additions.
Summary: RFE: place for per-host, per-user vimrc additions.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-26 14:08 UTC by Anton Guda
Modified: 2016-05-24 12:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-24 12:14:08 UTC
Type: Bug


Attachments (Terms of Use)

Description Anton Guda 2016-04-26 14:08:15 UTC
Description of problem:

Current vim installations uses solid /etc/vimrc for initialization.
It makes more difficult to maintain per-host (or per - organization)
configuration initialization changes.

Proposition: 
Add to the end of /etc/vimrc such lines:

" system local configs
for rcfile in split( globpath("/etc/vimrc.d", "*.vim"), '\n' )
  execute( 'source '.rcfile )
endfor
  
" user local configs
for rcfile in split( globpath("~/.vim/vimrc.d", "*.vim"), '\n' )
  execute( 'source '.rcfile )
endfor

And add descrption of /etc/vimrc.d/ to spec file:

mkdir -p %{buildroot}/%{_sysconfdir}/vimrc.d
...
%dir %{_sysconfdir}/vimrc.d

Benefits: both system administrators and users can easy adjust
vim behaviour.

Cost: minimal - number of loaded plugin files is mush more then number of configs

Comment 1 Karsten Hopp 2016-05-24 12:14:08 UTC
I think that this is such a special case that it shouldn't be implemented for the whole distribution, it just complicates things.
Feel free to change your /etc/vimrc as you wish, an update shouldn't overwrite your changes as those files are marked as %config(noreplace).


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