Skip to content

Instantly share code, notes, and snippets.

@shime
Created December 7, 2012 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shime/4236197 to your computer and use it in GitHub Desktop.
Save shime/4236197 to your computer and use it in GitHub Desktop.
my vimrc and gvimrc
"" Used for codeschool color theme
color codeschool
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
autocmd User Rails let b:surround_{char2nr('-')} = "<% \r %>" " displays <% %> correctly
" highlight lines longer than 80 chars
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
set list listchars=tab:→\ ,trail:·
set nocompatible " Choose no compatiblity with legacy vi
syntax enable
set encoding=utf-8
set showcmd
filetype plugin indent on
"" Whitespace
set nowrap " don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces
set expandtab " use spaces, not tabs
set backspace=indent,eol,start " backspace through everything in insert mode
"" Searching
set hlsearch " highlight matches
set incsearch " incremental searching
set ignorecase " searches are case insesitive...
set smartcase " ...unless they contain at least one capital letter
let mapleader="," " map leader to , instead of to slash
"" exiting with ctrl+q
map <C-Q> :qa!<CR>
"" saving with ctrl+s
map <C-S> :w<CR>
" easier navigation between split windows
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
set noswapfile " no swap files
" super fast Ack
map <Leader>a :Ack<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment