Skip to content

Instantly share code, notes, and snippets.

@jllodra
Created September 10, 2012 21:07
Show Gist options
  • Save jllodra/3693864 to your computer and use it in GitHub Desktop.
Save jllodra/3693864 to your computer and use it in GitHub Desktop.
.vimrc (my settings in Lion, Vim 7.3)
syntax on
set encoding=utf-8
set noautoindent
set ch=2
set cinoptions=(0
set nocompatible
set noerrorbells
set esckeys
set laststatus=2
set expandtab
filetype on
set hlsearch
set incsearch
set number
set shiftwidth=2
" number of spaces in a <TAB>
set tabstop=2
set title
" status line
function! InsertStatuslineColor(mode)
if a:mode == 'i'
hi statusline guibg=White ctermfg=white guifg=Black ctermbg=0
elseif a:mode == 'r'
hi statusline guibg=Purple ctermfg=5 guifg=Black ctermbg=0
else
hi statusline guibg=DarkRed ctermfg=1 guifg=Black ctermbg=0
endif
endfunction
au InsertEnter * call InsertStatuslineColor(v:insertmode)
au InsertLeave * hi statusline guibg=DarkGrey ctermfg=8 guifg=White ctermbg=15
hi statusline guibg=DarkGrey ctermfg=8 guifg=White ctermbg=15
set statusline=\ [%{&ff}\ -\ %{strlen(&fenc)?&fenc:'none'}]\ [%n]\ %y\ %r\ %1*%m%*%w%=%(Column:\ %c%)%4(%)%-10(Line:\ %l%)\ %4(%)%p%%\ \ \ \ \ ASCII=%b\ HEX=%B\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment