set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
source $VIMRUNTIME/cscope_maps.vim
behave mswin
if has("gui_running")
" 초기 VI 시작시 크기 설정 w * h
au GUIEnter * winsize 135 45
" 초기 VI 시작 위치 설정
au GUIEnter * winpos 0 0
endif
" 색상 선택
colorscheme darkblue
" 탭간격 조정
set ts=4
set sw=4
set sts=4
set scrolloff=2 " 2줄 이하로는 자동 스크롤 되게 하는 옵션
set nobackup " 백업 설정하지 않음
" 자동 들여쓰기를 설정합니다.
set ai
" 한글 자동 인식
set encoding=korea
set fileencodings=utf-8,korea
au! BufRead,BufNewFile *.tpl set filetype=html
au! BufRead,BufNewFile *.phtml set filetype=html
" 각 파일에 해당하는 문법(Syntax) 적용
syntax on
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
map <F1> v]}zf
map <F2> zo
map <F3> :tabnew <CR>
map <F11> :se enc=korea <CR>
map <F12> :se enc=utf8 <CR>
func! Sts()
let st=expand("<cword>")
exe "sts ".st
endfunc
nmap ,st :call Sts()<cr>
func! Tj()
let st=expand("<cword>")
exe "tj ".st
endfunc
nmap ,tj :call Tj()<cr>
set csto=0
set cst
set nocsverb
if filereadable("cscope.out")
cs add cscope.out
endif
set csverb
"==================================
func! Css()
let css=expand("<cword>")
new
exe "cs find s ".css
if getline(1)==" "
exe "q!"
endif
endfunc
nmap ,css :call Css()<cr>
"==================================
func! Csc()
let csc=expand("<cword>")
new
exe "cs find c ".csc
if getline(1)==" "
exe "q!"
endif
endfunc
nmap ,csc :call Csc()<cr>
"==================================
func! Csd()
let csd=expand("<cword>")
new
exe "cs find d ".csd
if getline(1)==" "
exe "q!"
endif
endfunc
nmap ,csd :call Csd()<cr>
"==================================
func! Csg()
let csg=expand("<cword>")
new
exe "cs find g ".csg
if getline(1)==" "
exe "q!"
endif
endfunc
nmap ,csg :call Css()<cr>
"==================================
" cscope 설정
set cscopequickfix=s-,c-,d-,i-,t-,e-
댓글 없음:
댓글 쓰기