Skip to content

Instantly share code, notes, and snippets.

@manlon
Created March 11, 2014 22:37
Show Gist options
  • Save manlon/9496558 to your computer and use it in GitHub Desktop.
Save manlon/9496558 to your computer and use it in GitHub Desktop.
if has("gui_macvim")
macmenu &File.New\ Tab key=<nop>
map <D-t> :CtrlP<CR>
endif
execute pathogen#infect()
syntax on
filetype plugin indent on
" ruby-friendly tab defaults
set tabstop=2
set smarttab
set shiftwidth=2
set autoindent
set smartindent " ??
set expandtab
" search options
set incsearch
" set ignorecase
" set smartcase
set scrolloff=5
autocmd BufRead,BufNewFile *.ru set filetype=ruby
autocmd FileType python set tabstop=4|set shiftwidth=4|set expandtab|set softtabstop=4
autocmd FileType javascript set tabstop=4|set shiftwidth=4|set expandtab|set softtabstop=4
set vb " visual bell
set number " Show line numbering
set ruler " line numbers and column the cursor is on
set showcmd " Display what command is waiting for an operator
set showmatch " Briefly jump to the previous matching paren
"set matchtime=2 " For .2 seconds
" home-row escape shortcut
:inoremap ;; <ESC>
" leader key
let mapleader = "\\"
:nmap <C-j> jzz
:nmap <C-k> kzz
" heresy
:inoremap <C-a> <esc>I
:inoremap <C-e> <esc>A
set wildmode=longest,list,full
set wildmenu
runtime! macros/matchit.vim
:colorscheme vividchalk
" Turn on menu bar in MacVim
:set guioptions+=T
" CtrlP options
let g:ctrlp_cmd = 'CtrlPMixed' " mixed mode (buffers too)
let g:ctrlp_match_func = {'match' : 'matcher#cmatch' } " better matcher (Command-T-like)
let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("e")': ['<c-t>'],
\ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
\ } " open in new tab by default
» ls ~/.vim/bundle
ctrlp-cmatcher ctrlp.vim vim-coffee-script vim-commentary vim-surround
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment