Skip to content

Instantly share code, notes, and snippets.

@bipthelin
Created February 28, 2012 20:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bipthelin/1934784 to your computer and use it in GitHub Desktop.
Save bipthelin/1934784 to your computer and use it in GitHub Desktop.
My Vimrc
filetype plugin indent on
color Kellys
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set noautochdir
if has('gui_running')
set guifont=Inconsolata:h14
set go-=T
set go-=l
set go-=L
set go-=r
set go-=R
endif
map <Up> <nop>
map <Down> <nop>
map <Left> <nop>
map <Right> <nop>
imap <Up> <nop>
imap <Down> <nop>
imap <Left> <nop>
imap <Right> <nop>
" add beams etc to useless file list
set wildignore+=*.beam,*.dump,*~,*.o,.git,*.png,*.jpg,*.gif,.DS_Store,.eunit,deps
" tripple escape closes buffer
map <esc><esc><esc> :bd<cr>
imap <esc><esc><esc> :bd<cr>
" Usesier 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
map <leader>w <C-w>v<C-w>li
map <leader>n :bn<CR>
" the same symbols as TextMate for tabstops and EOLs
set list
set listchars=tab:▸\
set colorcolumn=80
set showcmd
let g:erl_author="Bip Thelin <bip@kivra.com>"
let g:erl_company="Kivra"
let g:erl_replace_buffer=1
let g:erlangManPath="/usr/local/Cellar/erlang/R15B/share/man"
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']
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment