Created
February 9, 2011 09:23
-
-
Save BugRoger/818195 to your computer and use it in GitHub Desktop.
Michael's .vimrc
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
"setup pathogen | |
filetype off | |
call pathogen#runtime_append_all_bundles() | |
call pathogen#helptags() | |
filetype plugin indent on | |
compiler ruby | |
"gets rid of all the crap that Vim does to be vi compatible | |
set nocompatible | |
"prevents some security exploits having to do with modelines | |
set modelines=0 | |
"tab settings | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
"a few options that just make things better | |
set encoding=utf-8 | |
set scrolloff=3 | |
set autoindent | |
set showmode | |
set showcmd | |
set hidden | |
set wildmenu | |
set wildmode=list:longest | |
set visualbell | |
set cursorline | |
set ttyfast | |
set ruler | |
set backspace=indent,eol,start | |
set laststatus=2 | |
set relativenumber | |
"change leader away from \ | |
let mapleader = "," | |
"a few options that just make things better | |
nnoremap / /\v | |
vnoremap / /\v | |
set ignorecase | |
set smartcase | |
set gdefault | |
set incsearch | |
set showmatch | |
set hlsearch | |
nnoremap <leader><space> :noh<cr> | |
nnoremap <tab> % | |
vnoremap <tab> % | |
"makes Vim handle long lines correctly | |
set wrap | |
set textwidth=79 | |
set formatoptions=qrn1 | |
set colorcolumn=85 | |
"force arrow keys off | |
nnoremap <up> <nop> | |
nnoremap <down> <nop> | |
nnoremap <left> <nop> | |
nnoremap <right> <nop> | |
inoremap <up> <nop> | |
inoremap <down> <nop> | |
inoremap <left> <nop> | |
inoremap <right> <nop> | |
nnoremap j gj | |
nnoremap k gk | |
"Use the arrows to something usefull | |
map <right> :bn<cr> | |
map <left> :bp<cr> | |
"get rid of that stupid goddamned help key | |
inoremap <F1> <ESC> | |
nnoremap <F1> <ESC> | |
vnoremap <F1> <ESC> | |
"save on losing focus | |
au FocusLost * :wa | |
"Color scheme (terminal) | |
syntax on | |
colorscheme molokai | |
set guifont=Menlo:h12.5 | |
"Gui Options | |
set guioptions=-t | |
"Quickly edit/reload the vimrc file | |
nmap <silent> <leader>ev :e $MYVIMRC<CR> | |
nmap <silent> <leader>sv :so $MYVIMRC<CR> | |
"Shortcut to rapidly toggle `set list` | |
nmap <leader>l :set list!<CR> | |
if exists(":Tabularize") | |
nmap <Leader>t= :Tabularize /=<CR> | |
vmap <Leader>t= :Tabularize /=<CR> | |
nmap <Leader>t: :Tabularize /:\zs<CR> | |
vmap <Leader>t: :Tabularize /:\zs<CR> | |
endif | |
"Use the same symbols as TextMate for tabstops and EOLs | |
set listchars=tab:▸\ ,eol:¬ | |
"Ruby support | |
autocmd FileType ruby setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2 | |
runtime macros/matchit.vim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment