Skip to content

Instantly share code, notes, and snippets.

@connvoi
Created July 12, 2011 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save connvoi/1077279 to your computer and use it in GitHub Desktop.
Save connvoi/1077279 to your computer and use it in GitHub Desktop.
my vimrc
set nocompatible
set history=50
set ignorecase
set notitle
set wrapscan
set number
set ruler
set nolist
set showcmd
set showmatch
set laststatus=2
set backspace=indent,eol,start
set shiftwidth=2
set softtabstop=0
set backup
"set encoding=euc-jp
set encoding=utf-8
"set fileencodings=euc-jp
set fileencodings=utf-8,euc-jp,ucs-2le,ucs-2,cp932
set incsearch
set hlsearch
set modelines=10
set nolist
set tabstop=2
set expandtab
set autoindent
set backupdir=/Users/kyagi/backup
set backupext=.bak
set undolevels=100
let &directory = &backupdir
let g:neocomplcache_enable_at_startup = 1
filetype plugin on
filetype indent on
function AC_Brackets()
inoremap { {}<LEFT>
inoremap [ []<LEFT>
inoremap ( ()<LEFT>
inoremap " ""<LEFT>
inoremap ' ''<LEFT>
endfunction
if has("autocmd")
autocmd FileType php call AC_Brackets()
autocmd FileType c call AC_Brackets()
autocmd FileType cpp call AC_Brackets()
autocmd FileType javascript call AC_Brackets()
autocmd FileType perl call AC_Brackets()
autocmd FileType ruby call AC_Brackets()
endif
imap jj <ESC>
nmap j gj
nmap k gk
vmap j gj
vmap k gk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment