view rc/vimrc @ 418:c0ac21407903

Disable features on vim basic.
author Edho Arief <edho@myconan.net>
date Wed, 05 Dec 2012 02:33:47 -0800
parents 7ceec4404caf
children f4a29755dd01
line wrap: on
line source

set showmode
set showcmd
set nomodeline
set autoindent
set lazyredraw
set vb t_vb=
set ruler
set nohls
set nocompatible
set backspace=2
set esckeys
set noerrorbells
set ts=2
set expandtab
set title
set list

map <C-t><up> :tabr<cr>
map <C-t><down> :tabl<cr>
map <C-t><left> :tabp<cr>
map <C-t><right> :tabn<cr>
map <C-t>p :tabp<cr>
map <C-t>n :tabn<cr>
map <C-t><C-t> :NERDTreeToggle<cr>
map <C-t><C-m> :NERDTreeMirror<cr>

"autocmd VimEnter * NERDTree
"autocmd BufEnter * NERDTreeMirror

if has('syntax')
  syntax on
  set background=dark
  let g:solarized_termtrans=1
  colorscheme solarized
endif

if has("autocmd")
  autocmd BufRead,BufNewFile supervisord.conf :set ft=dosini
  autocmd BufRead,BufNewFile Gemfile :set ft=ruby
  autocmd BufRead,BufNewFile crontab.* :set noet ts=8 nolist
  autocmd BufRead,BufNewFile crontab :set noet ts=8 nolist
  autocmd BufRead,BufNewFile fstab :set noet ts=8 nolist
  autocmd BufRead,BufNewFile .git/COMMIT_EDITMSG :set noet ts=8 nolist
  autocmd BufRead,BufNewFile .gitconfig :set noet ts=8 nolist
  autocmd BufRead,BufNewFile .git/config :set noet ts=8 nolist
  autocmd BufRead,BufNewFile *.erb :set ft=eruby ts=2 et list
  autocmd BufRead,BufNewFile *.scss :set ft=scss
  autocmd BufRead,BufNewFile *.coffee :set ft=coffee
endif

if has('function!')
  "Restore cursor position
  set viminfo='10,\"100,:20,%,n~/.viminfo
  function! ResCur()
    if line("'\"") <= line("$")
      normal! g`"
      return 1
    endif
  endfunction

  augroup resCur
    autocmd!
    autocmd BufWinEnter * call ResCur()
  augroup END
endif