From c2a6de307e52901e0e93cd38b3846c3910268810 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 28 May 2022 09:18:42 -0700 Subject: [PATCH] [vim] Break out all the common settings into vimrc.common This way, vim has vimrc and nvim has config/nvim/init.vim and they do not have to worry about overriding settings. --- config/nvim/init.vim | 28 ++- vimrc | 410 ++----------------------------------------- vimrc.common | 392 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 432 insertions(+), 398 deletions(-) create mode 100644 vimrc.common diff --git a/config/nvim/init.vim b/config/nvim/init.vim index f182e5b..2a4f8fd 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -1,3 +1,29 @@ set runtimepath^=~/.vim runtimepath+=~/.vim/after let &packpath = &runtimepath -source ~/.vimrc + +source ~/.vimrc.common + +let g:python_host_prog=$HOME.'/.virtualenvs/neovim/bin/python' +let g:python3_host_prog=$HOME.'/.virtualenvs/neovim/bin/python3' + +" Backup files are saved here when files are overwritten +set backupdir=stdpath("data")."/backup" + +" Swap files are saved here while files are being edited +set directory=stdpath("data")."/swap" + +" Shared data file lives here +set shadafile=stdpath("data")."/nvim_shared_data" + +" Fields to save in the Shada file. Parameters as follows: (see :help shada) +" % number of buffers to save and restore when no file argument is given +" ' maximum number of previously edited files for which marks are remembered +" h disable highlighted search patterns on start +" / omitted, so all search history is saved +" < maximum number of lines saved for each register +" : maximum number of lines of command history to save +" s shada entries over 100 KiB are skipped +set shada=%100,'1000,h,<1000,:1000,s100 + +" Undo history for files is saved here +set undodir=stdpath("data")."/undo" diff --git a/vimrc b/vimrc index f05ffb6..5d72503 100644 --- a/vimrc +++ b/vimrc @@ -1,410 +1,26 @@ " ~/.vimrc " Eryn Wells -" Set the location of my vim directory. -let $VIM = $HOME."/.vim" +source ~/.vimrc.common " Set this first for Vundle set nocompatible " use enhanced vim features -filetype off " Needs to be off for Vundle to work (?) -let g:python_host_prog=$HOME.'/.virtualenvs/neovim/bin/python' -let g:python3_host_prog=$HOME.'/.virtualenvs/neovim/bin/python3' - -" -" VUNDLE PLUGINS -" - -set rtp+=$VIM/bundle/Vundle.vim -call vundle#begin() - -Plugin 'gmarik/Vundle.vim' - -" Filetypes -Plugin 'keith/swift.vim' -Plugin 'othree/html5.vim' -Plugin 'pangloss/vim-javascript' - -" Editing helpers -Plugin 'tpope/vim-repeat' -Plugin 'tpope/vim-speeddating' -Plugin 'tpope/vim-surround' -Plugin 'tpope/vim-unimpaired' -Plugin 'tpope/vim-commentary' -Plugin 'PeterRincker/vim-argumentative' - -Plugin 'sjl/gundo.vim' " Undo helper -Plugin 'scrooloose/nerdtree' -Plugin 'wincent/command-t' - -"Plugin 'erynofwales/vim-fancyfolds' -Plugin 'apple-swift', {'pinned': 1} -Plugin 'rust-lang/rust.vim' -Plugin 'tidalcycles/vim-tidal' - -" Colors~ -Plugin 'tomasr/molokai' - -" Snippets -Plugin 'MarcWeber/vim-addon-mw-utils' -Plugin 'tomtom/tlib_vim' -Plugin 'garbas/vim-snipmate' -Plugin 'honza/vim-snippets' - -call vundle#end() - -" -" CONFIG OPTIONS -" - -set autoread " reread files changed outside of vim -set noautowrite " don't write files before commands like :next and :make - -set ffs=unix,dos,mac " order of line ending formats to try - -set hidden " allow hidden buffers (rather than closing them) -set splitright " Open vertical splits to the right of the current window -set splitbelow " Open horizontal splits below the current window - -set number " show line numbers -set ruler " show ruler (line and col count) -set showmode " show mode -set showcmd " show last command -set title " change terminal title -set visualbell " don't beep -set noerrorbells " PLEASE don't beep -set ttyfast " fast terminals - -set wrap " wrap long lines -set linebreak " break at between words -set textwidth=120 " wrap at 120 characters -set colorcolumn=80,89,120 - " highlight these columns -set showmatch " show matching things: (), {}, [], etc - -set fo+=n " format numbered lists properly - -set nolist -set lcs+=tab:▸\ " show tabs -set lcs+=eol:¬ " show end-of-lines -set lcs+=trail:・ " show trailing spaces -set lcs+=extends:→ " show long lines (that go offscreen) -set lcs+=nbsp:・ " show non-breaking spaces - -set ignorecase " ignore case in searches -set smartcase " case-sensitive search if pattern contains a capital -set incsearch " show search matches as you type -set gdefault " apply searches globally to a line by default - -set laststatus=2 " always show status line - -" This is basically default status line, with a few exceptions: -" 1. Show buffer number before filename (%n:) -" 2. Show filetype after file name -set statusline=%2n:%<%f\ %((%Y)%)\ %(%h%m%r%)%=%-12(%l,%c%V%)%P - -set spelllang=en " set spelling language -set spellfile=$VIM/spelling.en.add - -set noswapfile " don't keep swap files -set nobackup " don't keep backup files set backupdir=$VIM/backup " save backup files here -set undofile " save undo history set undodir=$VIM/undo " save undo files here -set history=1000 " remember 1000 commands in history -set undolevels=1000 " keep lots of undo history -if !has('nvim') - set viminfo=%100,'100,/100,h,\"500,:100,n$VIM/.viminfo -else - set viminfo=%100,'100,/100,h,\"500,:100,n$VIM/.nviminfo -endif - " I have *NO* idea what this does... -set backspace=indent,eol,start - " backspace over everything in insert mode +" Shared data file. The vim and nvim formats are incompatible so this needs to +" be set differently for vim and nvim. +set viminfofile=$VIM/vim_shared_data -set tabstop=8 " tabs are always 8 spaces -set shiftwidth=4 " shift lines 4 spaces with >> and << -set softtabstop=4 " tab key inserts 4 spaces -set shiftround " round off indent to multiple of shiftwidth -set expandtab " always use spaces -set nojoinspaces " insert 1 space instead of 2 after punctuation on line - " join -set autoindent " always use autoindenting -set copyindent " copy previous indentation on autoindent +" Shada data. Parameters as follows: (see :help shada) +" % number of buffers to save and restore when no file argument is given +" ' maximum number of previously edited files for which marks are remembered +" h disable highlighted search patterns on start +" / omitted, so all search history is saved +" < maximum number of lines saved for each register +" : maximum number of lines of command history to save +" s shada entries over 100 KiB are skipped +set viminfo=%100,'100,h,<1000,:100,s100 -set scrolloff=3 " scroll 3 lines ahead of point -set sidescrolloff=5 " scroll 5 columns ahead of point - -set pastetoggle= " toggle paste mode with this - -" completion menu -set wildmenu -set wildmode=longest,list - -" Wild ignores -" build artifacts -set wildignore+=*.o,*.pyc,*~,.lo,*.class -set wildignore+=*.db,*.pdf,*.jpg,*.jpeg,*.png,*.gif -set wildignore+=.git,env,migrations - -if has('mouse') - set mouse=a -endif - -set modeline -set modelines=12 - -" Add my generated system tags files -set tags=./tags,tags -" These two are the important ones -set tags+=~/.tags/apple_frameworks.tags -set tags+=~/.tags/usr.tags -"set tags+=~/.tags/3rdparty_frameworks.tags -" This thing is 853 MB on my last count. It *probably* doesn't need to be -" included all the time... -"set tags+=~/.tags/usr_local.tags - -if $TERM_PROGRAM ==# "Apple_Terminal" - set title - " Apple Terminal lets you set the current document with this escape. - set t_ts=]6; - " Alarm character. - set t_fs= - " Write out the full path to the current file in the title string. - set titlestring=file://%{expand('%:p')} -endif - -" use syntax highlighting if the terminal can support it (or we're in a GUI) -if &t_Co > 2 || has('gui_running') - syntax on " turn on syntax highlighting -endif - -" Dark backgrounds are the only way to travel -set bg=dark - -try - colorscheme tomorrow_night -endtry - -let g:snipMate = { 'snippet_version': 1 } -" tell SnipMate who I am -let g:snips_author = 'Eryn Wells ' -" Set up some snippet scope aliases -let g:snipMate.scope_aliases = {} -let g:snipMate.scope_aliases["java"] = "android" - -" set the Gundo preview window on the bottom -let g:gundo_preview_bottom = 1 - -" -" PATHS -" - -set path=.,,/usr/local/include,/usr/include - -if has('mac') - let g:xcode_path = system('xcode-select -p') - let s:clang_library_path = g:xcode_path . 'Toolchains/XcodeDefault.xctoolchain/usr/lib' - if isdirectory(s:clang_library_path) - let g:clang_library_path = s:clang_library_path - endif -endif - -" -" Mappings -" - -noremap :NERDTreeToggle -noremap :GundoToggle -noremap :setlocal invlist - -inoremap kj - -" allow starting commands with ; instead of : -nnoremap ; : - -" tab to skip between braces and such in normal -"nnoremap % -"vnoremap % - -" use PCREs for searches -nnoremap / /\v -vnoremap / /\v - -" disable the help key! -noremap - -" make switching windows easier -nnoremap h -nnoremap j -nnoremap k -nnoremap l - -" Usual EMACS (oh the horror!) begin-line and end-line keys for first and last -" buffer. -"nnoremap :bfirst -"nnoremap :blast -" Move between buffers with and -nnoremap :bn -nnoremap :bp - - -function! strip_trailing_whitespace() - " save last search - let _s=@/ - " save cursor position - let l = line('.') - let c = col('.') - " do the clean up - %s/\s\+$//e - " restore saved stuff - let @/=_s - call cursor(l, c) -endfunction - - -function! SelectaCommand(choice_command, selecta_args, vim_command) - try - silent let selection = system(a:choice_command . " | selecta " . a:selecta_args) - catch /Vim:Interrupt/ - " Swallow ^C so the redraw below happens; otherwise there will be - " leftovers of selecta on screen. - redraw! - return - endtry - redraw! - exec a:vim_command . " " . selection -endfunction - - -" Key Mappings {{{ -let mapleader=',' - -" hide search terms -nnoremap :setlocal invhlsearch -" find all -nnoremap fa :%s/\v - -" strip all trailing whitespace in the current file -nnoremap W :call strip_trailing_whitespace() - -" Source .vimrc -nnoremap sv :source $MYVIMRC - -" Edit my .vimrc -nnoremap ev :split $MYVIMRC -" Edit the snippet file for the current filetype -nnoremap es :e ~/.vim/bundle/snipmate-snippets/snippets/=&filetype.snippets -" Edit the ftplugin-after script for the current filetype -nnoremap ef :e ~/.vim/after/ftplugin/=&filetype.vim - -" hide search terms -nnoremap :setlocal invhlsearch -" find all -nnoremap fa :%s/\v - -nnoremap f :call SelectaCommand("find * -type f", "", ":e") - -nnoremap cl :setlocal invcursorline -nnoremap cc :setlocal invcursorcolumn - -" Text bubbling (these depend on tpope's unimpaired plugin) -nnoremap [e -nnoremap ]e -vnoremap [egv -vnoremap ]egv - -" Select last edited text after cut and paste -nnoremap gV `[v`] - -" }}} - - -" Command-T should open files in tabs when I hit ; move opening files in -" buffers to -"let g:CommandTAcceptSelectionMap='' -"let g:CommandTAcceptSelectionTabMap='' - -" GitGutter shows changed lines in files. -"let g:gitgutter_enabled = 0 -"highlight clear SignColumn -"nnoremap gg :ToggleGitGutter - -" Don't underline folded lines -highlight Folded cterm=bold term=bold ctermfg=NONE ctermbg=NONE - -" Line numbers are a touch darker... -"highlight LineNr ctermfg=8 ctermbg=0 - -" Don't underline the CursorLine in color terminals; use dark black. -highlight CursorLine term=underline cterm=NONE ctermbg=0 -highlight CursorLineNr term=underline cterm=NONE ctermfg=7 ctermbg=0 - -" Autocommands {{{ -if has('autocmd') - filetype plugin indent on - - " Jump to last known cursor position unless it's the first line, or past the - " end of the file - augroup RestoreCursorPosition - autocmd! - autocmd BufReadPost * - \ if line("'\"") > 1 && line("'\"") <= line("$") | - \ exe "normal! g`\"" | - \ endif - augroup END - - " Reload snippets after editing the snippets file. Snippet files are - " .snippets. Get from the filename and reload the - " snippets for that type. - "augroup ReloadSnippets - " autocmd! - " autocmd BufWritePost *.snippets :call ReloadSnippets(expand('%:t:r')) - "augroup END - - " Clean whitespace before saving: Python, C, HTML, and Objective-C - augroup StripTrailingWhitespace - autocmd! - autocmd FileType python call strip_trailing_whitespace() - autocmd FileType c,cpp,objc,objcpp call strip_trailing_whitespace() - autocmd FileType html,css call strip_trailing_whitespace() - augroup END - - " Indent wrapped long lines of code to leading indent - augroup WrapLongLinesWithProperIndentation - autocmd! - autocmd FileType python,c,cpp,objc,objcpp,html,css setlocal breakindent showbreak=\ \ \ \ - augroup END - - augroup SConsFileType - autocmd! - autocmd BufRead SCons{truct,cript} setf python - augroup END - - " Toggle position highlighting - augroup HighlightCursorLineInNormalMode - autocmd! - autocmd BufEnter * setlocal cursorline - autocmd InsertEnter * setlocal nocursorline - autocmd InsertLeave * setlocal cursorline - augroup END - - augroup XCodeProjectFileType - autocmd! - autocmd BufRead *.pbxproj setf xcodepbx - augroup END - - augroup PListFileType - autocmd! - autocmd BufRead *.plist setf xml.plist - augroup END -endif -" }}} - -if has('unix') - if filereadable($HOME."/.vimrc.local") - source $HOME/.vimrc.local - endif -endif diff --git a/vimrc.common b/vimrc.common new file mode 100644 index 0000000..18add92 --- /dev/null +++ b/vimrc.common @@ -0,0 +1,392 @@ +" .vimrc.common +" Eryn Wells + +" This file holds settings common to nvim and vim. + +" Set the location of my vim directory. +let $VIM = $HOME."/.vim" + +" This will be enabled eventually, but it needs to be off for Vundle to work, +" apparently? +filetype off + +" +" VUNDLE PLUGINS +" + +set runtimepath+=$VIM/bundle/Vundle.vim +call vundle#begin() + +Plugin 'gmarik/Vundle.vim' + +" Filetypes +Plugin 'keith/swift.vim' +Plugin 'othree/html5.vim' +Plugin 'pangloss/vim-javascript' + +" Editing helpers +Plugin 'tpope/vim-repeat' +Plugin 'tpope/vim-speeddating' +Plugin 'tpope/vim-surround' +Plugin 'tpope/vim-unimpaired' +Plugin 'tpope/vim-commentary' +Plugin 'PeterRincker/vim-argumentative' + +Plugin 'sjl/gundo.vim' " Undo helper +Plugin 'scrooloose/nerdtree' +Plugin 'wincent/command-t' + +"Plugin 'erynofwales/vim-fancyfolds' +Plugin 'apple-swift', {'pinned': 1} +Plugin 'rust-lang/rust.vim' +Plugin 'tidalcycles/vim-tidal' + +" Colors~ +"Plugin 'tomasr/molokai' + +" Snippets +Plugin 'MarcWeber/vim-addon-mw-utils' +Plugin 'tomtom/tlib_vim' +Plugin 'garbas/vim-snipmate' +Plugin 'honza/vim-snippets' + +call vundle#end() + +" +" CONFIG OPTIONS +" + +set autoread " reread files changed outside of vim +set noautowrite " don't write files before commands like :next and :make + +set ffs=unix,dos,mac " order of line ending formats to try + +set hidden " allow hidden buffers (rather than closing them) +set splitright " Open vertical splits to the right of the current window +set splitbelow " Open horizontal splits below the current window + +set number " show line numbers +set ruler " show ruler (line and col count) +set showmode " show mode +set showcmd " show last command +set visualbell " don't beep +set noerrorbells " PLEASE don't beep +set ttyfast " fast terminals + +set wrap " wrap long lines +set linebreak " break at between words +set textwidth=120 " wrap at 120 characters +set colorcolumn=80,89,120 + " highlight these columns +set showmatch " show matching things: (), {}, [], etc + +set fo+=n " format numbered lists properly + +set nolist +set lcs+=tab:▸\ " show tabs +set lcs+=eol:¬ " show end-of-lines +set lcs+=trail:・ " show trailing spaces +set lcs+=extends:→ " show long lines (that go offscreen) +set lcs+=nbsp:・ " show non-breaking spaces + +set ignorecase " ignore case in searches +set smartcase " case-sensitive search if pattern contains a capital +set incsearch " show search matches as you type +set gdefault " apply searches globally to a line by default + +set laststatus=2 " always show status line + +" This is basically default status line, with a few exceptions: +" 1. Show buffer number before filename (%n:) +" 2. Show filetype after file name +set statusline=%2n:%<%f\ %((%Y)%)\ %(%h%m%r%)%=%-12(%l,%c%V%)%P + +set spelllang=en " set spelling language +set spellfile=$VIM/spelling.en.add + +" Save swap, backup, and undo files. Each editor dictates where these will live. +set swapfile +set backup +set undofile + +set history=1000 " remember 1000 commands in history +set undolevels=1000 " keep lots of undo history + +set backspace=indent,eol,start + " backspace over everything in insert mode + +set tabstop=8 " tabs are always 8 spaces +set shiftwidth=4 " shift lines 4 spaces with >> and << +set softtabstop=4 " tab key inserts 4 spaces +set shiftround " round off indent to multiple of shiftwidth +set expandtab " always use spaces +set nojoinspaces " insert 1 space instead of 2 after punctuation on line join +set autoindent " always use autoindenting +set copyindent " copy previous indentation on autoindent + +set scrolloff=3 " scroll 3 lines ahead of point +set sidescrolloff=5 " scroll 5 columns ahead of point + +set pastetoggle= " toggle paste mode with this + +" completion menu +set wildmenu +set wildmode=longest,list + +" Wild ignores +" build artifacts +set wildignore+=*.o,*.pyc,*~,.lo,*.class +set wildignore+=*.db,*.pdf,*.jpg,*.jpeg,*.png,*.gif +set wildignore+=.git,env,migrations + +if has('mouse') + set mouse=a +endif + +set modeline +set modelines=12 + +" Add my generated system tags files +set tags=./tags,tags +" These two are the important ones +set tags+=~/.tags/apple_frameworks.tags +set tags+=~/.tags/usr.tags +"set tags+=~/.tags/3rdparty_frameworks.tags +" This thing is 853 MB on my last count. It *probably* doesn't need to be +" included all the time... +"set tags+=~/.tags/usr_local.tags + +set title + +" use syntax highlighting if the terminal can support it (or we're in a GUI) +if &t_Co > 2 || has('gui_running') + syntax on " turn on syntax highlighting +endif + +" Dark backgrounds are the only way to travel +set bg=dark + +try + colorscheme tomorrow_night +endtry + +let g:snipMate = { 'snippet_version': 1 } +" tell SnipMate who I am +let g:snips_author = 'Eryn Wells ' +" Set up some snippet scope aliases +let g:snipMate.scope_aliases = {} +let g:snipMate.scope_aliases["java"] = "android" + +" set the Gundo preview window on the bottom +let g:gundo_preview_bottom = 1 + +" +" PATHS +" + +set path=.,,/usr/local/include,/usr/include + +if has('mac') + let g:xcode_path = system('xcode-select -p') + let s:clang_library_path = g:xcode_path . 'Toolchains/XcodeDefault.xctoolchain/usr/lib' + if isdirectory(s:clang_library_path) + let g:clang_library_path = s:clang_library_path + endif +endif + +" +" Mappings +" + +noremap :NERDTreeToggle +noremap :GundoToggle +noremap :setlocal invlist + +inoremap kj + +" allow starting commands with ; instead of : +nnoremap ; : + +" tab to skip between braces and such in normal +"nnoremap % +"vnoremap % + +" use PCREs for searches +nnoremap / /\v +vnoremap / /\v + +" disable the help key! +noremap + +" make switching windows easier +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +" Usual EMACS (oh the horror!) begin-line and end-line keys for first and last +" buffer. +"nnoremap :bfirst +"nnoremap :blast +" Move between buffers with and +nnoremap :bn +nnoremap :bp + + +function! strip_trailing_whitespace() + " save last search + let _s=@/ + " save cursor position + let l = line('.') + let c = col('.') + " do the clean up + %s/\s\+$//e + " restore saved stuff + let @/=_s + call cursor(l, c) +endfunction + + +function! SelectaCommand(choice_command, selecta_args, vim_command) + try + silent let selection = system(a:choice_command . " | selecta " . a:selecta_args) + catch /Vim:Interrupt/ + " Swallow ^C so the redraw below happens; otherwise there will be + " leftovers of selecta on screen. + redraw! + return + endtry + redraw! + exec a:vim_command . " " . selection +endfunction + + +" Key Mappings {{{ +let mapleader=',' + +" hide search terms +nnoremap :setlocal invhlsearch +" find all +nnoremap fa :%s/\v + +" strip all trailing whitespace in the current file +nnoremap W :call strip_trailing_whitespace() + +" Source .vimrc +nnoremap sv :source $MYVIMRC + +" Edit my .vimrc +nnoremap ev :split $MYVIMRC +" Edit the snippet file for the current filetype +nnoremap es :e ~/.vim/bundle/snipmate-snippets/snippets/=&filetype.snippets +" Edit the ftplugin-after script for the current filetype +nnoremap ef :e ~/.vim/after/ftplugin/=&filetype.vim + +" hide search terms +nnoremap :setlocal invhlsearch +" find all +nnoremap fa :%s/\v + +nnoremap f :call SelectaCommand("find * -type f", "", ":e") + +nnoremap cl :setlocal invcursorline +nnoremap cc :setlocal invcursorcolumn + +" Text bubbling (these depend on tpope's unimpaired plugin) +nnoremap [e +nnoremap ]e +vnoremap [egv +vnoremap ]egv + +" Select last edited text after cut and paste +nnoremap gV `[v`] + +" }}} + + +" Command-T should open files in tabs when I hit ; move opening files in +" buffers to +"let g:CommandTAcceptSelectionMap='' +"let g:CommandTAcceptSelectionTabMap='' + +" GitGutter shows changed lines in files. +"let g:gitgutter_enabled = 0 +"highlight clear SignColumn +"nnoremap gg :ToggleGitGutter + +" Don't underline folded lines +highlight Folded cterm=bold term=bold ctermfg=NONE ctermbg=NONE + +" Line numbers are a touch darker... +"highlight LineNr ctermfg=8 ctermbg=0 + +" Don't underline the CursorLine in color terminals; use dark black. +highlight CursorLine term=underline cterm=NONE ctermbg=0 +highlight CursorLineNr term=underline cterm=NONE ctermfg=7 ctermbg=0 + +" Autocommands {{{ +if has('autocmd') + filetype plugin indent on + + " Jump to last known cursor position unless it's the first line, or past the + " end of the file + augroup RestoreCursorPosition + autocmd! + autocmd BufReadPost * + \ if line("'\"") > 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + augroup END + + " Reload snippets after editing the snippets file. Snippet files are + " .snippets. Get from the filename and reload the + " snippets for that type. + "augroup ReloadSnippets + " autocmd! + " autocmd BufWritePost *.snippets :call ReloadSnippets(expand('%:t:r')) + "augroup END + + " Clean whitespace before saving: Python, C, HTML, and Objective-C + augroup StripTrailingWhitespace + autocmd! + autocmd FileType python call strip_trailing_whitespace() + autocmd FileType c,cpp,objc,objcpp call strip_trailing_whitespace() + autocmd FileType html,css call strip_trailing_whitespace() + augroup END + + " Indent wrapped long lines of code to leading indent + augroup WrapLongLinesWithProperIndentation + autocmd! + autocmd FileType python,c,cpp,objc,objcpp,html,css setlocal breakindent showbreak=\ \ \ \ + augroup END + + augroup SConsFileType + autocmd! + autocmd BufRead SCons{truct,cript} setf python + augroup END + + " Toggle position highlighting + augroup HighlightCursorLineInNormalMode + autocmd! + autocmd BufEnter * setlocal cursorline + autocmd InsertEnter * setlocal nocursorline + autocmd InsertLeave * setlocal cursorline + augroup END + + augroup XCodeProjectFileType + autocmd! + autocmd BufRead *.pbxproj setf xcodepbx + augroup END + + augroup PListFileType + autocmd! + autocmd BufRead *.plist setf xml.plist + augroup END +endif +" }}} + +if has('unix') + if filereadable($HOME."/.vimrc.local") + source $HOME/.vimrc.local + endif +endif