Find file
Fetching contributors…
Cannot retrieve contributors at this time
157 lines (127 sloc) 4.53 KB
" Tabs/spaces
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
" xd to delete line, yanking to blackhole register (doesn't replace clipboard)
map xd "_dd
" keep blocks selected when indenting
vnoremap < <gv
vnoremap > >gv
" no fold by default
set nofoldenable
" ,a to search
map <leader>a :Ack
" ,<space> clears search result highlights etc
map <leader><space> :let @/=''<cr>
" add beams etc to useless file list
set wildignore+=*.beam,*.dump,*~,*.o,.git,*.png,*.jpg,*.gif,_rel*
set encoding=utf-8
augroup myfiletypes
autocmd!
autocmd BufNewFile,BufRead *.jinja set filetype=jinja
autocmd BufNewFile,BufRead *.sql set filetype=psql
autocmd BufNewFile,BufRead *.migration set filetype=psql
autocmd BufNewFile,BufRead *.vcl set filetype=vcl
autocmd BufNewFile,BufRead *.json set filetype=json
autocmd BufNewFile,BufRead *.mkd,*.md set filetype=mkd ai formatoptions=tcroqn2
" go to beginning, insert boilerplate, then line 2
autocmd BufNewFile *.py 0r ~/.janus/python-boilerplate.py
autocmd BufNewFile *.py 2
" autoindent with two spaces, always expand tabs
autocmd FileType ruby,eruby,yaml set ai sw=2 sts=2 et
" Over-length highlighting (110 chars)
autocmd FileType python highlight link OverLength SpellBad
autocmd FileType python match OverLength /\%111v.\+/
autocmd FileType python set ai sw=4 sts=4 et
augroup END
" Python stuff
let python_highlight_all=1
let g:syntastic_python_flake8_args='--max-complexity=10 --max-line-length=110 --ignore=W191'
let g:syntastic_python_checkers=['flake8']
let g:syntastic_check_on_open=1
let g:syntastic_enable_signs=0
set viminfo='20,\"1000
" unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
"let g:airline_symbols.linenr = '¶'
"let g:airline_symbols.branch = '⎇'
"let g:airline_symbols.paste = 'ρ'
"let g:airline_symbols.paste = 'Þ'
"let g:airline_symbols.paste = '∥'
"let g:airline_symbols.whitespace = 'Ξ'
" triple escape closes buffer
map <esc><esc><esc> :bd<cr>
imap <esc><esc><esc> :bd<cr>
" Fuck you, help key.
inoremap <F1> <ESC>:set invfullscreen<CR>a
nnoremap <F1> :set invfullscreen<CR>
vnoremap <F1> :set invfullscreen<CR>
" Easier buffer navigation
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
" Use the same symbols as TextMate for tabstops and EOLs
set list
set listchars=tab:▸\ ,eol:¬
" Color scheme (terminal)
syntax on
set background=dark
colorscheme molokai
" colorscheme delek
map <F3> :BuffergatorToggle<cr>
" NERD Tree
map <F2> :NERDTreeToggle<cr>
let NERDTreeIgnore=['\.beam$', '\.dump$', '\.pyc', '\~$', '^\.', '^_rel']
set colorcolumn=80
let erlang_skel_header = { "author": "Richard Jones", "owner" : "IRCCloud Ltd." }
"let g:erl_author="Richard Jones <rj@metabrew.com>"
"let g:erl_company="IRCCloud Ltd."
"let g:erl_replace_buffer=1
"""let g:erlangManPath="/usr/local/Cellar/erlang/R15B01/share/man"
"let g:erl_tpl_dir="/Users/rj/.vim/bundle/erlang-skel/plugin/templates/"
"""let erlang_skel_dir = "~/.janus/plugin/erlang_skels"
if has('gui_running')
set guifont=Menlo:h14
colorscheme molokai
set background=dark
set go-=T
set go-=l
set go-=L
set go-=r
set go-=R
if has("gui_macvim")
" Full screen on macvim should fully maxed out
set fuopt=maxvert,maxhorz
"macmenu &File.New\ Tab key=<nop>
"map <leader>t <Plug>PeepOpen
else
set guifont=DejaVu\ Sans\ Mono\ 13
end
"let g:sparkupExecuteMapping = '<D-e>'
"highlight SpellBad term=underline gui=undercurl guisp=Orange
endif
" Use omni completion if module_name:something, for erlang:
" (by default, supertab uses . :: ->, but not a single :
"function SuperErlangContext()
" let exclusions = exists('g:SuperTabContextTextFileTypeExclusions') ?
" \ g:SuperTabContextTextFileTypeExclusions : []
" if index(exclusions, &ft) == -1
" let curline = getline('.')
" let cnum = col('.')
" let synname = synIDattr(synID(line('.'), cnum - 1, 1), 'name')
" if curline =~ '.*\(\w\|[\])]\)\(:\)\w*\%' . cnum . 'c' && synname !~ '\(String\|Comment\)'
" return "\<c-x>\<c-o>"
" endif
" endif
" no return will result in the evaluation of the next
" configured context
"endfunction
let g:SuperTabDefaultCompletionType = "context"
"let g:SuperTabCompletionContexts = ['SuperErlangContext', 's:ContextText', 's:ContextDiscover']
" no man page erlang completion:
"let g:erlangCompletionDisplayDoc = 0