feat(coreos-base/coreos-base): Add default vimrc so vim acts like vim.

Because, I mean, really.
This commit is contained in:
Michael Marineau 2013-08-10 14:46:05 -04:00
parent 73b14d27cf
commit 741c2aa70c
3 changed files with 22 additions and 0 deletions

View File

@ -128,6 +128,10 @@ src_install() {
# Insert glibc's nsswitch.conf since that is installed weirdly
doins "${FILESDIR}"/nsswitch.conf
# Insert a mini vimrc to avoid driving everyone insane
insinto /etc/vim
doins "${FILESDIR}"/vimrc
# Symlink /etc/localtime to something on the stateful partition, which we
# can then change around at runtime.
dosym /var/lib/timezone/localtime /etc/localtime || die

View File

@ -0,0 +1,18 @@
" Minimal configuration file for Vim on CoreOS
"
" The vim package is installed with USE=minimal to avoid installing lots of
" extra files but that doesn't mean we like vim acting as if it were vi.
" General settings from Gentoo's default vimrc:
set nocompatible " Use Vim defaults (much better!)
set bs=2 " Allow backspacing over everything in insert mode
set ruler " Show the cursor position all the time
set nomodeline " We don't allow modelines by default
" Read vimrc from the state partition if it exists.
if filereadable("/media/state/etc/vim/vimrc")
source /etc/vim/vimrc
endif
if filereadable("/media/state/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif