Created
July 29, 2011 17:37
-
-
Save wheeyls/1114301 to your computer and use it in GitHub Desktop.
My .vimrc (Windows, GVIM)
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
set nocompatible | |
call pathogen#infect() | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! | |
Bundle 'gmarik/vundle' | |
" My Bundles | |
Bundle 'scrooloose/syntastic' | |
Bundle 'mattn/gist-vim' | |
Bundle 'mattn/webapi-vim' | |
Bundle 'tpope/vim-rails' | |
Bundle 'tpope/vim-fugitive' | |
Bundle 'tpope/vim-repeat' | |
Bundle 'tpope/vim-surround' | |
Bundle 'tpope/vim-abolish' | |
Bundle 'henrik/vim-yaml-flattener' | |
Bundle 'Lokaltog/vim-easymotion' | |
Bundle 'rygwdn/vim-conque' | |
Bundle 'widox/vim-buffer-explorer-plugin' | |
Bundle 'vim-scripts/Colour-Sampler-Pack' | |
Bundle 'kchmck/vim-coffee-script' | |
Bundle 'edsono/vim-matchit' | |
Bundle 'vim-scripts/vimwiki' | |
Bundle 'wincent/Command-T' | |
Bundle 'danro/rename.vim' | |
Bundle 'wheeyls/vim-rspec-runner' | |
let g:gist_detect_filetype = 1 | |
let g:mgutz_tabline=1 | |
let g:gist_get_multiplefile = 1 | |
let g:gist_open_browser_after_post = 1 | |
set background=light | |
"colors chance-of-storm | |
colors candycode | |
let g:xml_syntax_folding = 1 | |
syntax on | |
filetype plugin on | |
set foldmethod=syntax | |
"edit large files | |
let g:SaveUndoLevels = &undolevels | |
let g:BufSizeThreshold = 1000000 | |
if has("autocmd") | |
" Store preferred undo levels | |
au VimEnter * let g:SaveUndoLevels = &undolevels | |
" Don't use a swap file for big files | |
au BufReadPre * if getfsize(expand("<afile>")) >= g:BufSizeThreshold | setlocal noswapfile | endif | |
" Upon entering a buffer, set or restore the number of undo levels | |
au BufEnter * if getfsize(expand("<afile>")) < g:BufSizeThreshold | let &undolevels=g:SaveUndoLevels | else | set undolevels=-1 | set ft=none | endif | |
endif | |
"mouse per | |
"http://floriancrouzat.net/2010/07/compile-and-run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ | |
"if has("mouse") | |
"set mouse=a | |
"set mousehide | |
"endif | |
"history and backup | |
set history=50 | |
set directory=~/vimswaps/ | |
set viminfo='10,\"100,:50,%,n~/.viminfo | |
set backupdir=~/vimbackups/ | |
"tabs | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
"end tabs | |
set formatoptions=t | |
"set textwidth=70 | |
set encoding=utf-8 | |
"set termencoding=latin1 | |
set hlsearch | |
" jackass scrolling | |
set scrolloff=10 | |
"nnoremap <space> zz | |
"nnoremap k kzz | |
"nnoremap j jzz | |
"nnoremap h hzz | |
"nnoremap l lzz | |
"nnoremap n nzz | |
"nnoremap G Gzz | |
"set guifont=courier_new:h10 | |
set guifont=Monaco:h14,"ProggyTinySZ",Courier\ New:h10,Courier,Lucida\ Console,Letter\ Gothic, | |
\Arial\ Alternative,Bitstream\ Vera\ Sans\ Mono,OCR\ A\ Extended | |
set visualbell | |
set noerrorbells | |
"editor | |
set number | |
set ruler | |
set autoindent | |
set smartindent | |
set whichwrap=<,>,h,l | |
set backspace=2 | |
set wildmenu | |
set wildmode=list:longest | |
" matching brackets | |
set showmatch | |
set matchtime=3 | |
"gui only | |
set guioptions=bgmrL | |
" shortcuts | |
let mapleader = "," | |
map <leader>rf :call rspecrunner#RunSpecsFile()<CR> | |
map <leader>re :call rspecrunner#RunSpecsExample()<CR> | |
map <leader>a G$vgg"+y | |
map <leader>c "+y | |
map <leader>p "+p | |
map <leader>n :NERDTree<CR> | |
map <leader>v :tabnew $MYVIMRC<CR> | |
map <leader>i :tabnew ~/Dropbox/vimwiki/index.wiki<CR> | |
map <leader>g :tabnew ~/Dropbox/vimwiki/grateful.wiki<CR> | |
map <leader>h :%s/></><C-v><C-m></g<CR> | |
map <leader>l :g/^\s*$/d<CR> | |
map <leader><leader>c :!ccc<CR> | |
map <leader>s :%s/\s\+$//g<CR> | |
map <leader>rf :call rspecrunner#RunSpecsFile()<CR> | |
map <leader>re :call rspecrunner#RunSpecsExample()<CR> | |
vnoremap * y/<C-R>"<CR> | |
au BufNewFile,BufRead *.js setf javascript | |
au BufNewFile,BufRead *.jsm setf javascript | |
" highlight tabs and trailing spaces | |
set list listchars=trail:_ | |
highlight SpecialKey ctermfg=LightRed | |
set list listchars=tab:\|_,trail:. | |
" highlight >80 chars | |
highlight OverLength ctermbg=red ctermfg=white guibg=#592929 | |
match OverLength /\%81v.\+/ | |
" vim -b : edit binary using xxd-format! | |
augroup Binary | |
au! | |
au BufReadPre *.bin let &bin=1 | |
au BufReadPost *.bin if &bin | %!xxd | |
au BufReadPost *.bin set ft=xxd | endif | |
au BufWritePre *.bin if &bin | %!xxd -r | |
au BufWritePre *.bin endif | |
au BufWritePost *.bin if &bin | %!xxd | |
au BufWritePost *.bin set nomod | endif | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where is this located for you?