Created
January 12, 2012 14:53
-
-
Save atoumey/1600954 to your computer and use it in GitHub Desktop.
My .vimrc
This file contains 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
" These were generated by GVim when I installed it | |
set nocompatible | |
source $VIMRUNTIME/vimrc_example.vim | |
source $VIMRUNTIME/mswin.vim | |
behave mswin | |
" Pretty font | |
set gfn=Consolas:h9:cANSI | |
" Show line numbers | |
set nu! | |
" Pretty color scheme | |
colorscheme slate | |
" Start with a wider window size | |
set lines=50 columns=200 | |
" Press F5 to list open buffers at the bottom, then allow me to press a number | |
" and <Enter> to pick one | |
nnoremap <F5> :buffers<CR>:buffer<Space> | |
" Show a horizontal list of completion options when I press <Tab> in the | |
" command input area | |
set wildmenu | |
" Keep buffers open even when they aren't displayed in a window | |
set hidden | |
" Use syntax highlighting, manually set .config files to use XML syntax | |
syntax on | |
filetype on | |
au BufNewFile,BufRead *.config set filetype=xml | |
" Turn on folding by default, but don't fold very much when opening a file | |
" (foldlevel=0 would mean fold everything | |
set foldmethod=indent | |
set foldenable | |
set foldlevel=10 | |
" Use 4 spaces instead of tabs | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set smartindent | |
set expandtab | |
" No idea what this does; it was generated by GVim | |
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