Created
March 30, 2012 21:38
-
-
Save dsosby/2255328 to your computer and use it in GitHub Desktop.
vimrc for work pc (win)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
source $VIMRUNTIME/vimrc_example.vim | |
source $VIMRUNTIME/mswin.vim | |
"behave mswin | |
if has('gui_running') | |
set guioptions-=T " no toolbar | |
colorscheme obsidian2 | |
endif | |
set ic "Ignore case when searching | |
set number | |
set nocompatible "No to VI compatible mode | |
set backup "Make backup files | |
set mouse=a | |
set showcmd | |
set guifont=Consolas:h9 | |
set ffs=unix,dos | |
set autoindent | |
set expandtab | |
set numberwidth=4 | |
set shiftwidth=4 | |
set tabstop=4 | |
set tw=150 | |
syntax on | |
filetype plugin on | |
filetype plugin indent on | |
"Setup taglist | |
let Tlist_Sort_Type = "name" | |
let Tlist_Use_Right_Window = 1 | |
let Tlist_GainFocus_On_ToggleOpen = 1 | |
let Tlist_Exit_OnlyWindow = 1 | |
:nmap <F3> :TlistToggle<CR> | |
"Setup NERDTree | |
let NERDTreeChDirMode = 2 | |
:nmap <F4> :NERDTreeToggle<CR> | |
set backupdir=C:\temp\vim | |
set directory=C:\temp\vim | |
"Windows maximize function | |
"(http://vim.wikia.com/wiki/Maximize_or_set_initial_window_size) | |
au GUIEnter * simalt ~x | |
call pathogen#infect() | |
let vimclojureRoot = "C:/vim/vimfiles/bundle/vimclojure" | |
let vimclojure#HighlightBuiltins=1 | |
let vimclojure#HighlightContrib=1 | |
let vimclojure#DynamicHighlighting=1 | |
let vimclojure#ParenRainbow=1 | |
set diffexpr=MyDiff() | |
function MyDiff() | |
let opt = '-a --binary ' | |
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif | |
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif | |
let arg1 = v:fname_in | |
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif | |
let arg2 = v:fname_new | |
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif | |
let arg3 = v:fname_out | |
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif | |
let eq = '' | |
if $VIMRUNTIME =~ ' ' | |
if &sh =~ '\<cmd' | |
let cmd = '""' . $VIMRUNTIME . '\diff"' | |
let eq = '"' | |
else | |
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"' | |
endif | |
else | |
let cmd = $VIMRUNTIME . '\diff' | |
endif | |
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq | |
endfunction | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment