Skip to content

Instantly share code, notes, and snippets.

@lukerandall
Created September 20, 2010 09:33
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 lukerandall/587664 to your computer and use it in GitHub Desktop.
Save lukerandall/587664 to your computer and use it in GitHub Desktop.
set hidden " allow buffers to be hidden when they have unsaved changes
set visualbell " turn off beeps
set nobackup " don't need backups with git
call pathogen#runtime_append_all_bundles()
let mapleader = "," " map leader key
imap jj <Esc>
" Remap C-(e|y) so that they scroll by 3 lines
nnoremap <C-e> 3<C-e>
nnoremap <C-y> 3<C-y>
map <leader>d :execute 'NERDTreeToggle ' . getcwd()<CR>
map <leader>n :execute 'TlistToggle'<CR>
let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
let g:easytags_cmd = '/usr/local/bin/ctags'
let g:CommandTMaxHeight=15
set directory=/tmp/ " save temp files in /tmp
set history=1000 " keep n items in history
set wildmenu " enable menu for commands
set wildmode=list:longest " list options when hitting tab, and match longest common command
set wildignore=*.log,*.swp,*~ " ignore these files when completing
set backspace=indent,eol,start " allow backspacing over autoindent, eols and start of insert
colorscheme molokai
syntax on " enable syntax highlighting
filetype plugin on " enable filetype detection and plugins
filetype plugin indent on " indent according to file type
set number " line numbers
set hlsearch " highlight matches
set incsearch " incremental search
set ignorecase " ignore case when searching
set smartcase " unless search terms are upper case
set expandtab " replace tabs with spaces
set softtabstop=2 " use 2 spaces
set shiftwidth=2 " used by indentation commands
set autoindent " copy previous line indentation
set grepprg=ack\ -a " use ack for grepping
nmap <silent> <leader>s :set nolist!<CR>
set listchars=trail:·,precedes:<,extends:>
set shortmess=atI " Shorten file messages
runtime macros/matchit.vim " Enable matching with %
" f5 removes trailing whitespace
nnoremap <silent> <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>:retab<CR>
" duplicate selection in visual mode
vmap D y'>p
set title " display title
set scrolloff=3 " keep n lines of offset when scrolling
if has("gui_macvim")
set fuoptions=maxvert,maxhorz " fullscreen options (MacVim only), resized window when changed to fullscreen
set guifont=Monaco:h10
set guioptions-=T " remove toolbar
set noanti " turn off anti-aliasing
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment