본문 바로가기
OS/Linux

vim 환경 변수 설정

by darkdevilness 2014. 10. 22.
728x90

gVim  환경 변수 설정( _vimrc 파일 내용)

 

set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

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

set clipboard=unnamed
set scrolloff=5

filetype on

syntax on
set hi=100
set nu!
set tabstop=4
set shiftwidth=4
set cindent
set nobackup
set showmatch


 

728x90

'OS > Linux' 카테고리의 다른 글

파일 디스크립터 dev/null>&null  (0) 2015.01.28
vi에서 호출 함수 찾아가기  (0) 2014.10.23
Linux grep 명령어  (0) 2014.10.22
Linux find 명령어  (0) 2014.10.22
shell script 로 telnet 자동 실행 접속 방법  (0) 2012.11.05