Skip to content

Instantly share code, notes, and snippets.

@deanohyeah
Last active October 17, 2015 05:52
Show Gist options
  • Save deanohyeah/9775486 to your computer and use it in GitHub Desktop.
Save deanohyeah/9775486 to your computer and use it in GitHub Desktop.
.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
" Ctrlp options
let g:ctrlp_root_markers = ['.ctrlp']
let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("e")': ['<c-t>'],
\ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
\ }
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*.,*/.DS_Store,*/tmp/*
" not sure if this does anything
if executable('Ag')
" Use ag over grep
set grepprg=Ag\ --nogroup\ --nocolor
:endif
let g:ctrlp_working_path_mode = 'ra'
:colorscheme monokai
:inoremap ;; <ESC>
set vb
set number
set ruler
set showcmd
set showmatch
set smartcase
" nice font, https://github.com/adobe/source-code-pro
set guifont=SourceCodePro-Medium:h14
" ruby-friendly tab defaults
set tabstop=2
set smarttab
set softtabstop=2
set shiftwidth=2
set autoindent
set smartindent
set expandtab
" search options
set incsearch
set hlsearch
" clears highlight on escape
nnoremap <CR> :noh<CR><esc>
let mapleader = ","
:command NN CtrlP ~/src/current/ui_nodejs
:command W CtrlP ~/src/current/web
:command! -nargs=1 AgS Ag <f-args> ~/src/current/ui_nodejs/lib/assets/stylesheets
:command! -nargs=1 AgV Ag <f-args> ~/src/current/ui_nodejs/lib/views
:command! -nargs=1 AgT Ag <f-args> ~/src/current/ui_nodejs/lib/templates
:command! -nargs=1 AgL Ag <f-args> ~/src/current/ui_nodejs/lib/
:command! -nargs=1 AgTest Ag <f-args> ~/src/current/ui_nodejs/test/
set autoread
" sets haml syntax for hamlc files
au BufRead,BufNewFile *.hamlc set ft=haml
autocmd BufNewFile,BufRead *.scss set ft=scss.css
" removes whitespace on save
au BufWritePre * :%s/\s\+$//e
" sets tabs for scss files
autocmd FileType scss setlocal tabstop=4|set shiftwidth=4|set expandtab|set softtabstop=4
" saves session of open tabs
let g:session_autosave = 'yes'
let g:session_autoload = 'yes'
" adds blank space
nmap <S-Enter> O<Esc>j
nmap <CR> o<Esc>k
" stops cw at .
set iskeyword-=.
" set path to current file dir
set autochdir
" allows gf to open files without extensions
set suffixesadd+=.coffee
"get rid of psky swap files
set noswapfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment