Skip to content

Instantly share code, notes, and snippets.

@manlon
Created April 14, 2015 18:33
Show Gist options
  • Save manlon/6821b1e41ac689dfe923 to your computer and use it in GitHub Desktop.
Save manlon/6821b1e41ac689dfe923 to your computer and use it in GitHub Desktop.
filetype on
filetype off
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
let g:ackprg = 'ag --nogroup --nocolor --column'
:nmap <leader>A :Ack
:nmap <leader>a #*:AckFromSearch<Enter>
:nmap <C-Enter> <C-w><C-]><C-w>T
:nmap <leader>\ Vgcj
:nmap <leader><space> i<space><esc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment