From 655c5519f4246302fb045f2b8c610e505e982e66 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 1 Nov 2012 10:16:14 -0700 Subject: [PATCH] Move GUI stuff to gvimrc; fix local vimrc include --- gvimrc | 17 +++++++++++++++++ vimrc | 46 ++++++++++++++++------------------------------ 2 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 gvimrc diff --git a/gvimrc b/gvimrc new file mode 100644 index 0000000..3ebf94b --- /dev/null +++ b/gvimrc @@ -0,0 +1,17 @@ +set bg=light +set cursorline + +if has('win32') || has('win64') || has('win32unix') + set guifont=Inconsolata:h18 +elseif has('mac') + try + set guifont=Source\ Code\ Pro:h13 + catch + set guifont=Menlo:h11 + endtry +elseif has('linux') + set guifont=Inconsolata\ 14 +endif + +set guioptions-=T " turn off toolbar +set guioptions-=m " turn off menubar diff --git a/vimrc b/vimrc index 09d2cd8..279269c 100644 --- a/vimrc +++ b/vimrc @@ -32,9 +32,7 @@ set showmatch " show matching things: (), {}, [], etc set fo+=n " format numbered lists properly -if has('gui_running') - set list -endif +set list " show spaces, newlines, etc set lcs+=tab:▸\ " show tabs set lcs+=eol:¬ " show end-of-lines set lcs+=trail:・ " show trailing spaces @@ -109,14 +107,11 @@ if &t_Co > 2 || has('gui_running') syntax on " turn on syntax highlighting endif +set bg=dark + " use solarized colorscheme if the terminal can support it (or we're in a GUI) let g:solarized_termtrans=1 let g:solarized_visibility='low' -if has('gui') - set bg=light -else - set bg=dark -endif colorscheme solarized " tell SnipMate who I am @@ -125,28 +120,10 @@ let g:snips_author = 'Eryn Wells ' " set the Gundo preview window on the bottom let g:gundo_preview_bottom = 1 -if &t_Co > 2 || has('gui_running') - set cursorline -endif - -if has('gui_running') - if has('win32') || has('win64') - set guifont=Inconsolata:h18 - elseif has('mac') - try - set guifont=Source\ Code\ Pro:h13 - catch - set guifont=Menlo:h11 - endtry - elseif has('linux') - set guifont=Inconsolata\ 14 - endif - set guioptions-=T " turn off toolbar - set guioptions-=m " turn off menubar -endif - nmap :GundoToggle +inoremap jj + " allow starting commands with ; instead of : nnoremap ; : @@ -191,6 +168,13 @@ nmap fa :%s/\v nmap sn :e ~/.vim/bundle/snipmate/snippets/=&filetype.snippets +" Toggle position highlighting +nmap cl :set invcursorline +nmap cc :set invcursorcolumn + +" Toggle listmode +map :set invlist + " Command-T should open files in tabs when I hit ; move opening files in " buffers to let g:CommandTAcceptSelectionMap='' @@ -214,6 +198,8 @@ if has('autocmd') \ :call StripTrailingWhitespace() endif -if exists("~/.vimrc.local") - source ~/.vimrc.local +if has('unix') + if filereadable($HOME."/.vimrc.local") + source $HOME/.vimrc.local + endif endif