Skip to content

Instantly share code, notes, and snippets.

@reiddraper
Created April 4, 2012 14:49
Show Gist options
  • Select an option

  • Save reiddraper/2302081 to your computer and use it in GitHub Desktop.

Select an option

Save reiddraper/2302081 to your computer and use it in GitHub Desktop.
call pathogen#runtime_append_all_bundles()
set nocompatible
set list
set scroll=6
set scrolloff=999
set softtabstop=4
set tabstop=4
set expandtab
set sw=4
syntax enable
set cursorline
set ai
set number
inoremap kj <Esc>
map <space> viwxi
let mapleader = ","
map <leader>v :vs<CR>
map <leader>h :split<CR>
set foldmethod=indent "fold based on indent
set foldnestmax=1 "deepest fold is 10 levels
set nofoldenable "dont fold by default
set foldlevel=1
" Wildmenu completion {{{
set wildmenu
set wildmode=list:longest
set wildignore+=.hg,.git,.svn " Version control
set wildignore+=*.aux,*.out,*.toc " LaTeX intermediate files
set wildignore+=*.jpg,*.bmp,*.gif,*.png,*.jpeg " binary images
set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest " compiled object files
set wildignore+=*.spl " compiled spelling word lists
set wildignore+=*.sw? " Vim swap files
set wildignore+=*.DS_Store " OSX bullshit
set wildignore+=*.luac " Lua byte code
set wildignore+=migrations " Django migrations
set wildignore+=*.pyc " Python byte code
set wildignore+=*.orig " Merge resolution files
" Clojure/Leiningen
set wildignore+=classes
set wildignore+=lib
" }}}
" Backups {{{
set undodir=~/.vim/tmp/undo// " undo files
set backupdir=~/.vim/tmp/backup// " backups
set directory=~/.vim/tmp/swap// " swap files
set backup " enable backups
set noswapfile
" searching
set ignorecase
set smartcase
set incsearch
set showmatch
set hlsearch
set gdefault
map <leader>c :noh<CR>
let g:slime_target = "tmux"
map <leader>e <C-c><C-c>
" ack for last search
nnoremap <silent> <leader>? :execute "Ack! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>
"
noremap j gj
noremap k gk
"
"gist plugin"
let g:gist_detect_filetype = 1
let g:gist_private = 1
let g:gist_open_browser_after_post = 1
" colors
let g:solarized_termtrans=1
set background=light
colorscheme solarized
filetype on
filetype plugin on
filetype indent on
"clojure nailgun"
let vimclojure#WantNailgun = 1
let vimclojure#FuzzyIndent = 1
set laststatus=2
let g:Powerline_symbols = 'fancy'
"plugins
map <leader>a :Ack!
" ctrl-p
" }}}
" Ctrl-P {{{
let g:ctrlp_dont_split = 'NERD_tree_2'
let g:ctrlp_match_window_reversed = 1
let g:ctrlp_open_new_file = 'v'
let g:ctrlp_jump_to_buffer = 0
let g:ctrlp_map = '<leader>,'
let g:ctrlp_working_path_mode = 2
let g:ctrlp_match_window_reversed = 1
let g:ctrlp_split_window = 0
let g:ctrlp_max_height = 20
let g:ctrlp_extensions = ['tag']
let g:ctrlp_arg_map = 1
let g:ctrlp_prompt_mappings = {
\ 'PrtSelectMove("j")': ['<c-j>', '<down>', '<s-tab>'],
\ 'PrtSelectMove("k")': ['<c-k>', '<up>', '<tab>'],
\ 'PrtHistory(-1)': ['<c-n>'],
\ 'PrtHistory(1)': ['<c-p>'],
\ 'ToggleFocus()': ['<c-tab>'],
\ }
let ctrlp_filter_greps = "".
\ "egrep -iv '\\.(" .
\ "jar|class|swp|swo|log|so|o|pyc|jpe?g|png|gif|mo|po|beam" .
\ ")$' | " .
\ "egrep -v '^(\\./)?(" .
\ "lib/|classes/|libs/|deploy/vendor/|.git/|.hg/|.svn/|.*migrations/" .
\ ")'"
let my_ctrlp_user_command = "" .
\ "find %s '(' -type f -or -type l ')' -maxdepth 15 -not -path '*/\\.*/*' | " .
\ ctrlp_filter_greps
let my_ctrlp_git_command = "" .
\ "cd %s && git ls-files | " .
\ ctrlp_filter_greps
let g:ctrlp_user_command = ['.git/', my_ctrlp_git_command, my_ctrlp_user_command]
nnoremap <leader>. :CtrlPTag<cr>
" remove the thick toolbar in macvim
if has("gui_running")
set guioptions=-t
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment