.vimrc

~/.vimrc

syntax enable
syntax on

" Configuration file for vim
filetype on
set enc=utf-8
set fenc=utf-8
set ff=unix
set fencs=utf-8,iso-2022-jp,euc-jp,cp932
setl fenc=utf-8
setl ff=unix

" view
set ruler
set paste
set title
set showcmd
set showmatch
set expandtab
retab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
set smartindent
set cursorline
set cursorcolumn
set list
set listchars=tab:>-
" set number
set clipboard=unnamed

" set fdm=marker
set ambiwidth=double
set nobackup

" omnifunc
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType c set omnifunc=ccomplete#Complete

" search
set ignorecase
set wrapscan
set smartcase
set hlsearch

" color
hi LineNr ctermbg=0 ctermfg=0
hi CursorLineNr ctermbg=4 ctermfg=0

set whichwrap=b,s,<,>,[,]

augroup vimrcEx
  au BufRead * if line("'\"") > 0 && line("'\"") <= line("$") |
  \ exe "normal g`\"" | endif
augroup END

" todo.txt
command! Todo edit ~/memo/todo.txt