Break up vimrc into files for specific purposes.

Add some logic to work with a local, non-version controlled rc file whose only
job is to configure where the local git repo is and source in those separate
files without killing the current working directory from which vim was launched,
in case there is a project specific .vimrc as well.
This commit is contained in:
Thomas Gideon 2015-03-20 13:16:03 -04:00
commit ce56db4cf4
4 changed files with 64 additions and 0 deletions

4
gvimrc Normal file
View file

@ -0,0 +1,4 @@
set guifont=Monaco:h14
set lines=60
set columns=200
colorscheme desert

9
java.vim Normal file
View file

@ -0,0 +1,9 @@
let g:JavaImpDataDir = $HOME . "/.vim/JavaImp"
" F7 to call clean redundant Java imports and sort them
function JavaImpClean()
%!~/bin/clean_imports.sh %
:JavaImpSort
endfunction
:command JavaImpClean exec JavaImpClean()
:nnoremap <F7> :JavaImpClean<CR>

31
vimrc Normal file
View file

@ -0,0 +1,31 @@
" set the directory where my vimrc git project is located
source ~/.vimrc_local
" source aux files also under git control
let oldwd = getcwd()
exec "cd " . vimrc_git
source vundle.vim
source java.vim
exec "cd " . oldwd
filetype plugin indent on
syntax on
set exrc
set secure
set incsearch
set wildmode=longest:full
set wildmenu
set nocp
set lbr
set sbr=+
set laststatus=2
set stl=%-0.100f\ %r\ %m%=line\ %l\ of\ %L\ --%p%%--\
set fde=1
set fdm=syntax
set backspace=start,indent,eol
set textwidth=80
set anti enc=utf-8
set listchars+=nbsp
color desert

20
vundle.vim Normal file
View file

@ -0,0 +1,20 @@
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'rustushki/JavaImp.vim'
Plugin 'Tagbar'
Plugin 'vim-misc'
Plugin 'easytags.vim'
Plugin 'editorconfig-vim'
" All of your Plugins must be added before the following line
call vundle#end() " required