Skip to content

Instantly share code, notes, and snippets.

@pluskid
Created February 7, 2009 06:18
Show Gist options
  • Save pluskid/59793 to your computer and use it in GitHub Desktop.
Save pluskid/59793 to your computer and use it in GitHub Desktop.
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
let mapleader=","
filetype on
syntax on
if has('gui_running')
color ir_black
else
set mouse=
end
set guifont=Andale\ Mono\ 12
set number
set incsearch
set formatoptions+=mB
set tabstop=4
set expandtab
set shiftwidth=4
set encoding=utf8
set fileencodings=utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set laststatus=2
set backspace=indent,eol,start
set ruler
set backupdir=~/.vim/backup-files
au BufNewFile, BufRead *.groovy setf groovy
if did_filetype()
finish
endif
if getline(1) =~ '^#!.*[/\\]groovy\>'
setf groovy
endif
autocmd FileType mail set textwidth=70
autocmd FileType mail set wrap
autocmd FileType mail set spell
augroup filetypedetect
au BufNewFile,BufRead mail.google.com* setf mail
augroup END
autocmd FileType python set tabstop=4
autocmd FileType python set shiftwidth=4
autocmd FileType python set smarttab
autocmd FileType python set expandtab
autocmd FileType python set softtabstop=4
autocmd FileType python set autoindent
autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
nnoremap <leader>f :FuzzyFinderFile <C-r>=expand('%:~:.')[:-1-len(expand('%:~:.:t'))]<CR><CR>
nnoremap <leader>t :tabnew<CR>:FuzzyFinderFile <C-r>=expand('%:~:.')[:-1-len(expand('%:~:.:t'))]<CR><CR>
nnoremap <leader>b :FuzzyFinderBuffer<CR>
nnoremap <S-Left> :tabprev<CR>
nnoremap <S-Right> :tabnext<CR>
source $VIMRUNTIME/macros/matchit.vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment