Skip to content

Instantly share code, notes, and snippets.

@tlehman
Created April 2, 2012 00:05
Show Gist options
  • Save tlehman/2279577 to your computer and use it in GitHub Desktop.
Save tlehman/2279577 to your computer and use it in GitHub Desktop.
My vim configuration file
" tlehman's vimrc as of Wed 03/28/2012
"
" Pathogen.vim is a plugin by tpope available here: https://github.com/tpope/vim-pathogen
" It allows for vim plugins be easily installed in their own private
" directories.
"
" To install pathogen, (Assuming vim is installed), create an autoload and
" bundle directory:
" mkdir -p ~/.vim/autoload ~/.vim/bundle
" Then curl the file into autoload
"
" curl -so ~/.vim/autoload/pathogen.vim \
" https://raw.github.com/tpope/vim-pathogen/HEAD/autoload/pathogen.vim
" Finally, the following line in .vimrc enables pathogen
call pathogen#infect()
" Now, to install a vim plugin, copy the repository to ~/.vim/bundle/<plugin>
syntax on
filetype plugin indent on
" UTF-8 support
set encoding=utf-8
" some unicode characters: suppose {xᵢ} is such that Σxᵢ² converges
set shiftwidth=2
set tabstop=2
set softtabstop=2
set expandtab
" highlight search results
set hlsearch
set incsearch
" don't wrap text
set nowrap
" made this less obnoxious by lowering the hex value to #333333 in koehler.vim
"set cursorline
" clear search highlighting with ESC (vimbits)
"nnoremap <esc> :noh<cr><esc>
set number
" gvim specific settings
if has("gui_running")
" always use line numbers in the gui-vim
set lines=40
colors koehler
set guifont=Monaco:h13
set guioptions-=T
" resize Vsplits on window resize (vimbits)
au VimResized * exe "normal! \<c-w>="
else
set background=dark
endif
" mapped keys
" clear the shell
map ,c :!clear<cr>
" save and run ruby script
map ,r :w\|:!ruby %<cr>
" test file in rspec
map ,s :w\|:!rspec % --color --format doc<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment