"============================================================================== " Edited by Guk-Bong Kwon 2010/04/28 "============================================================================== "============================================================================== " $VIMRUNTIME À» ¸ÕÀú ¼³Á¤ ÇØÁØ´Ù. ±âº»ÀûÀ¸·Î ¼³Á¤À» ÇØÁÖÁö ¾Ê¾Æµµ µÇ³ª ÀνÄÀÌ " ¾ÈµÇ´Â ½Ã½ºÅÛÀÌ ÀÖ¾î ±âº» °ªÀ¸·Î ¼³Á¤À» ÇØ ÁØ´Ù. "============================================================================== if has("unix") " let $VIMRUNTIME="/usr/share/vim/vim72" elseif has ("win32") " let $VIMRUNTIME="C:\\Program Files\\Vim\\vim72" endif "============================================================================== " ±âº»ÀûÀ¸·Î ¼³Á¤µÇ´Â ¿¹Á¦µéÀ» Æ÷ÇÔ ÇÑ´Ù. history .. µî.. "============================================================================== source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/gvimrc_example.vim "============================================================================== " À©µµ¿ì¿¡¼­¸¸ »ç¿ëµÇ´Â ¿©·¯°¡Áö Å° ¸ÊµéÀ» Æ÷ÇÔÇÑ´Ù. " C-v, C-c, C-q, C-a µî... "============================================================================== if has("win32") " source $VIMRUNTIME/mswin.vim " CTRL-C and CTRL-Insert are Copy vnoremap "+y vnoremap "+y endif "============================================================================== " selection, selectmode mousemodel µî xterm-color ¿¡ ÇØ´çµÇ´Â ³»¿ëÀ» ¼³Á¤ " set 'selection', 'selectmode', 'mousemodel' and 'keymodel' for xterm-color "============================================================================== behave xterm "============================================================================== " ¿£Å͸¦ Ä¡°Å³ª O, o ·Î ÁÙÀ» »ðÀÔ ÇÒ¶§ ÀÚµ¿À¸·Î indentition ÇÏ´Â °¡¿¡ ´ëÇÑ " ¿É¼ÇÀÌ´Ù. "============================================================================== set ai "============================================================================== " ¾Æ·¡¿Í °°Àº ¸í·É½Ã ÀÚµ¿À¸·Î ÀúÀå ÇÏ´Â °¡¿¡ ´ëÇÑ ¿É¼ÇÀÌ´Ù. " :next, :rewind, :last, :first, :previous, :stop, :suspend, :tag, :!, " :make, CTRL-] and CTRL-^ command; and when a CTRL-O, CTRL-I, " '{A-Z0-9}, or `{A-Z0-9} command takes one to another file. "============================================================================== set aw "============================================================================== " ¾Æ·¡¿Í °°Àº ¸í·É¾î½Ã ¸ðµÎ ÀúÀåÇÏ´Â °¡¿¡ ´ëÇÑ ¿É¼ÇÀÌ´Ù. " Like 'autowrite', but also used for commands ":edit", ":quit", " :qall", ":exit", ":xit", ":recover" and closing the Vim window. "============================================================================== set awa "============================================================================== " ÆÄÀÏÀ» ¿­¾î¼­ ÆíÁý ÇÏ°í ÀÖ´Â Áß¿¡ ÆÄÀÏÀÌ º¯°æ µÇ¾úÀ»¶§ ÀÚµ¿À¸·Î Àо " °»½ÅÇÏ´Â °¡¿¡ ´ëÇÑ ¿É¼ÇÀÌ´Ù. ÀÚµ¿À¸·Î °»½ÅÀ» ÇÏ¸é ³»°¡ ÆíÁýÇÑ ºÎºÐ¿¡ ´ëÇؼ­ " ºÐ½ÇÇÒ À§ÇèÀÌ ÀÖ´Ù. "============================================================================== set noautoread "============================================================================== " vim Àº ±âº»ÀûÀ¸·Î ÆÄÀÏÀ» ÀúÀå Çϱâ Àü¿¡ ¹é¾÷ ÆÄÀÏÀ» ¸¸µå´Âµ¥ ±× ÆÄÀÏÀ» " ÀúÀåÇÏ´Â µð·ºÅ丮¸¦ ¼³Á¤ ÇÏ´Â ºÎºÐÀÌ´Ù. "============================================================================== if has("unix") set backupdir=~/tmp,~/,/tmp elseif has ("win32") set backupdir=C:\Program\ Files\Vim\backup endif "============================================================================== " status line ³ôÀ̸¦ Á¤ÇÏ´Â ¿É¼ÇÀÌ´Ù. ±âº» °ªÀÌ 1ÀÌ´Ù. "============================================================================== set ch=1 "============================================================================== " C¾ð¾î¸¦ ÀÛ¼ºÇÒ¶§ indentition À» ÇÒ °Í Àΰ¡¿¡ ´ëÇÑ ¿É¼ÇÀÌ´Ù. "============================================================================== set cindent "============================================================================== " ±¸½Ä vi ¿Í µ¿ÀÏÇÏ°Ô ÀÛµ¿ÇÒ °ÍÀΰ¡¿¡ ´ëÇÑ ¿É¼ÇÀÌ´Ù. ±¸½Ä vi¿Í µ¿ÀÏÇÏ°Ô " ÀÛµ¿Çϵµ·Ï ¼³Á¤µÈ´Ù¸é ¸¹Àº Æí¸®ÇÑ ±â´ÉÀ» »ç¿ëÇÒ¼ö ¾øÀ» °ÍÀÌ´Ù. "============================================================================== set nocompatible "============================================================================== " vimdiffÀ϶§ °ø¹éÀ» ¹«½Ã "============================================================================== set diffopt+=iwhite "============================================================================== " óÀ½ ¸¸µé¾î Áö´Â ÆÄÀÏ¿¡ ´ëÇÑ ÀÎÄÚµù¿¡ ´ëÇÑ ¼³Á¤ÀÌ´Ù. À©µµ¿ì¿Í À¯´Ð½º°¡ Ʋ¸®´Ù. " ȯ°æº¯¼ö¿¡¼­ ÀÚµ¿À¸·Î ¸¸µé¾î Áø´Ù. ko_KR.eucKR->euc-kr, ko_KR.UTF-8->utf-8 " ȯ°æº¯¼ö¸¸ Á¤È®È÷ ¼³Á¤µÇ¾î ÀÖ°í ȯ°æº¯¼öµ¥·Î »ç¿ëÇϱ⸦ ¿øÇÑ´Ù¸é ¼³Á¤ ÇÏÁö " ¾Ê¾Æµµ ¹«¹æÇÏ´Ù. "============================================================================== if has("unix") set encoding=euc-kr elseif has ("win32") set encoding=cp949 endif "============================================================================== " indentition ½Ã ÅÇ´ë½Å °ø¹éÀ» »ðÀÔ Çϴ°¡¿¡ ´ëÇÑ ¿É¼ÇÀÌ´Ù. ÀÌ ¿É¼ÇÀÇ °æ¿ì " Makefile ¸¦ ÀÛ¼ºÇÒ¶§´Â ÇÊÈ÷ ²¨¾ß µÇ´Â ¿É¼ÇÀÌ´Ù Makefile ´Â ÅÇ°ú °ø¹éÀ» " Á¤È®È÷ ±¸ºÐÇϱ⠶§¹®ÀÌ´Ù. ÅÇÀ¸·Î Á¤È®È÷ ÀÛ¼ºµÇ¾ú´Â°¡¸¦ ¾Ë¾Æ º¼·Á¸é :set list " ¸í·ÉÀ» ÁÖ¸é Á¤È®È÷ ¾Ë¾Æ º¼¼ö ÀÖ°Ô µÈ´Ù. "============================================================================== set expandtab au BufNewFile,BufRead [mM]akefile,[mM]akefile*,GNUmakefile,*.mk,*.mak,*.dsp \ set noexpandtab "============================================================================== " ÇöÀç µð·ºÅ丮¿¡ .vimrc °¡ ÀÖÀ» °æ¿ì ~/.vimrc ¸¦ Àоî ÃʱâÈ­ÈÄ¿¡ ÇöÀç " µð·ºÅ丮¿¡ .vimrc¸¦ ´õºÒ¾î ÀÐ¾î ¿É¼ÇÀ» ´Ù½Ã ¼³Á¤ ÇÑ´Ù. " ./.vimrc ¸¦ ÀÐ¾î µéÀ̱â À§ÇÔ exrc °¡ ´õ ³ªÁß¿¡ ½ÇÇà µÇ´Â °Í °°À½ "============================================================================== set exrc au BufNewFile,BufRead *.c,*.h,*.java,*.cpp,*.jsp,*.php,*.ph set exrc " exrc °¡ ¾ÈµÇ¼­ Àӽà ¹æÆí if has("unix") au BufNewFile,BufRead *.c,*.h,*.java,*.cpp,*.jsp,*.php,*.ph \ if filereadable(".vimrc") | so .vimrc | endif elseif has("win32") au BufNewFile,BufRead *.c,*.h,*.java,*.cpp,*.jsp,*.php,*.ph \ if filereadable("_vimrc") | so _vimrc | endif endif "============================================================================== " ±âÁ¸¿¡ Á¸ÀçÇÏ´Â ¹®¼­¸¦ ÀÐ¾î µéÀ϶§ ¼³Á¤ÇÏ´Â ÀÎÄÚµùÀÌ´Ù fileencodings¿¡ ³ª¿­µÈ " °ÍµéÁß¿¡ Çϳª¸¦ ÀÚµ¿À» ¼±ÅÃÇÏ¿© °í¸¥´Ù. ¼³Á¤À» ÇØÁÖÁö ¾Ê¾Æµµ ¹«¹æÇÏ´Ù. "============================================================================== if has("unix") set fileencoding=utf-8 elseif has ("win32") set fileencoding=cp949 endif "============================================================================== " ±âÁ¸ÀÇ Á¸Àç ÇÏ´Â ÆÄÀϵéÀ» ÀÐ¾î µéÀ϶§ ¾Æ·¡ÀÇ ³ª¿­µÈ ÀÎÄÚµù¿¡¼­ Çϳª¸¦ " Àû¿ëÇÑ´Ù. "============================================================================== set fileencodings=utf-8 "set fileencodings=ucs-bom,utf-8,latin1,euc-kr "============================================================================== " Æú´õ¸¦ »ç¿ëÇÏ´Â ¹æ¹ý¿¡ ´ëÇؼ­ ¼³Á¤ÇÑ´Ù. marker ´Â { {{ ¿Í °°Àº Ç¥½ÄÀ» " »ç¿ëÇÏ¿© Æúµù µÇ´Â ¼Ò½ºÀÇ ¹üÀ§¸¦ ¼³Á¤ ÇØ ³õ´Â´Ù. ÀÌ´Â ÀÌ ÆÄÀÏÀ» ´Ù½Ã " ¿­¾úÀ»¶§ ±âÁ¸ÀÇ Æú´õ Á¤º¸¸¦ ±×´ë·Î À¯Áö ÇÒ¼ö ÀÖ°Ô ÇØ ÁØ´Ù. "============================================================================== set foldmethod=marker "============================================================================== " Æú´õ ¼³Á¤ÀÌ µÇ¾î ÀÖ´Â ÆÄÀÏÀ» ¿­¾úÀ»¶§ Æú´õ µÇ¾î ÀÖ´Â ·¹º§À» ¼³Á¤ÇÑ´Ù. " ±âº»°ª 0ÀÌ°í ¸ðµÎ ÆúµùµÈ´Ù. "============================================================================== set fdl=0 "============================================================================== " ¼Ò½ºÆÄÀÏÀÌ Æúµù µÇ¾î ÀÖÀ»¶§ Æúµù¹üÀ§¸¦ º¸¿©ÁÖ´Â Ä÷³ÀÇ ¼ö¸¦ ¼³Á¤ÇÑ´Ù. "============================================================================== set fdc=3 "============================================================================== " À©µµ¿ì »ç¿ë½Ã gvimÀÇ ÆùÆ®¹× gui ¿É¼ÇÀ» ¼³Á¤ÇÑ´Ù. gui ¿É¼ÇÀº ¸Þ´º, ½ºÅ©·Ñ¹Ù, " Åø¹Ù, ½ºÅ©·Ñ¹ÙÀÇ À§Ä¡ ±âŸ µîµî gvim »ç¿ë½Ã º¸¿© Áö´Â °Íµé¿¡ ´ëÇÑ ¿É¼ÇÀ» " ¼³Á¤ÇÏ´Â °ÍÀÌ´Ù. ¾Æ·¡ÀÇ ¼³Á¤Àº ¾Æ¹«°Íµµ ¾øÀÌ »ç¿ëÇÏ´Â °ÍÀÌ´Ù. "============================================================================== if has("win32") set guifont=±¼¸²Ã¼:h9:cHANGEUL set guioptions= endif "============================================================================== " ÆÄÀÏ ÆíÁý½Ã undo ÇÒ¼ö ÀÖ´Â ÃÖ´ë Ƚ¼ö¸¦ ¼³Á¤ÇÑ´Ù. "============================================================================== set history=1000 "============================================================================== " search ½Ã ã´Â ´Ü¾î¸¦ ÇÏÀ̶óÀÌÆà ÇØ ÁØ´Ù. "============================================================================== set hlsearch "============================================================================== " ã±â, ¹Ù²Ù±â µî¿¡¼­ ´ë¼Ò¹®ÀÚ ±¸ºÐÀ» ÇÏÁö ¾Ê´Â´Ù. "============================================================================== set ignorecase "============================================================================== " MS À©µµ¿ì¿¡¼­ ÇÑ¿µ Àüȯ ÆÐÄ¡°¡ µÇ¾úÀ»¶§ insert ¸ðµå³ª command ¸ðµå·Î µé¾î " °¥¶§ ¿µ¾î·Î ÀÔ·Â ½ÃÀÛÇÏ°Ô ÇÑ´Ù. ¾Æ·¡´Â ±âº» °ªÀÌ´Ù. "============================================================================== "set noimdisable "set noimcmdline "============================================================================== " search½Ã(/) ¿µ¾î·Î ÀÔ·ÂÀÌ ½ÃÀÛ µÇ°Ô ÇÑ´Ù. "============================================================================== "set iminsert=0 "set imsearch=0 "============================================================================== " ÇÑÅÒ¿¡¼­ ÇÑ¿µÀüȯÀ» Shift+space ·Î º¯°æÇÒ ¼ö ÀÖ°Ô ÇÑ´Ù. "============================================================================== "set imactivatekey=S-space " "============================================================================== " status line(¸Ç¾Æ·¡ »óÅÂÁÙ)ÀÌ Ç×»ó ³ª¿À°Ô ÇØ ÁØ´Ù. ±âº»Àº(1) µÎ°³ ÀÌ»óÀÇ " À©µµ¿ì¸¦ ¿­¾úÀ»½Ã(À©µµ¿ì¸¦ splitÇÒ¶§)¸¸ ³ª¿À°Ô µÈ´Ù. "============================================================================== set laststatus=2 "============================================================================== " ¹» ¶æÇÏ´ÂÁö Àß ¸ð¸£°Ú´Ù. "============================================================================== set linebreak "============================================================================== " MS windows ¿¡¼­ ¶óÀÎ °£°ÝÀ» Á¶Á¤ ÇØ ÁØ´Ù. ±âº» °ªÀº 1ÀÌ´Ù. "============================================================================== if has("win32") set linespace=0 endif "============================================================================== " ÁÙ¹øÈ£¸¦ º¸¿© ÁØ´Ù. "============================================================================== set number "============================================================================== " >>, << command ½Ã shift ÇÒ Å©±â¸¦ Á¤ÇØÁØ´Ù Åë»ó ¿Í µ¿ÀÏÇÏ°Ô ¼³Á¤ ÇÏ¸é µÈ´Ù. "============================================================================== set shiftwidth=4 "============================================================================== " ´Ý´Â °ýÈ£")", ºê¶óÄÏ"}"À» ÀԷ½à ¸ÅĪµÇ´Â ¿©´Â °ýÈ£, ºê¶óÄÏ¿¡ Àá½Ã Ä¿¼­°¡ " À§Ä¡Çß´Ù°¡ ´Ù½Ã Á¦ÀÚ¸®·Î µ¹¾Æ ¿Â´Ù. "============================================================================== set showmatch "============================================================================== " ¹» ¶æÇÏ´ÂÁö Àß ¸ð¸£°Ú´Ù. "============================================================================== set smarttab "============================================================================== " "============================================================================== set smartindent "============================================================================== " "============================================================================== set softtabstop=4 "============================================================================== " È­¸é ¸Ç ¾Æ·¡ »óÅ ÁÙÀÌ ¾î¶»°Ô ³ª¿À´Â °¡¸¦ Çü½ÄÈ­ ÇÏ´Â °ÍÀÌ´Ù. "============================================================================== set statusline=\ %f\ %m%h%r\ [%P]\ %a\ %<%l:%v "============================================================================== " °¢ ÆÄÀÏÀÇ ¼º°Ý(?)¿¡ ¸Â°Ô »ö±ò·Î º¸¿© ÁØ´Ù. "============================================================================== syntax on "============================================================================== " vi°¡ ³¡³­ ÈÄ¿¡ È­¸é Á¦¾î¸¦ ÇÑ´Ù. Áï vi°¡ ³¡ÀÌ ³­ÈÄ È­¸éÀ» vi°¡ ½ÃÀÛ Çϱâ " ÀüÀ¸·Î µÇµÉ·Á ³õ´Â°¡ ¾Æ´Ñ°¡¸¦ °áÁ¤ ÇÑ´Ù. º¸Åë xterm* ÀÇ °æ¿ì´Â vi°¡ ½ÃÀÛ µÇ±â " ÀüÀÇ È­¸éÀ¸·Î µÇµ¹·Á ³õ´Â´Ù. "============================================================================== set t_te="" set t_ti="" " "============================================================================== " ÅÇÀ¸·Î »ç¿ëÇÒ Å©±â¸¦ Á¤ÇÑ´Ù. tabstop ¸¦ 4·Î µÑ°æ¿ì ±âÁ¸ÀÇ ¸¹Àº ¼Ò½ºµéÀÇ " indentation ÀÌ ±ú¾î Áö±â ¶§¹®¿¡ tabstop´Â 8·Î ³õ°í shiftwidthÀ» 4·Î ³õÀ¸¸é " º¸´Â ¼Ò½º´Â tabstop¸¦ 8·Î º¼¼ö ÀÖ°í Á÷Á¢ ÀÛ¼ºÇÏ´Â ¼Ò½º¿¡ indentationÀ» 4·Î " ¸ÂÃâ¼ö°¡ ÀÖ´Ù. ¿äÁòÀº tabstopÀÌ 4·Î °¡´Â Ãß¼¼ÀÌ´Ù. "============================================================================== set tabstop=8 "============================================================================== " ¿î¿µÃ¼Á¦¿¡ ¸Â´Â Å͹̳ÎÀ» ¼³Á¤ÇÑ´Ù. À¯´Ð½ºÀÇ °æ¿ì´Â xterm À̳ª " xterm-colorÀ¸·Î ¼³Á¤ÇÏ°í MS À©µµ¿ìÀÇ °æ¿ì´Â win32·Î ¼³Á¤ÇÑ´Ù. À¯´Ð½ºÀÇ °æ¿ì " Å͹̳ο¡ µû¶ó backspace, del Å°°¡ ÀÛµ¿À» ´Þ¸® ÇÏ´Ï °¢ Å͹̳ÎÀ» »ç¿ëÇØ º¸°í " ¿ÀÀÛµ¿ ÇÏÁö ¾Ê´Â Å͹̳ÎÀ» ¼±ÅÃÇÏ¿© »ç¿ëÇÑ´Ù. "============================================================================== if has("unix") " set term=xterm " set term=xterm-color " set term=xterm-16color set term=xterm-256color elseif has ("win32") " set term=win32 endif "============================================================================== " È®ÀåÀÚ°¡ txt ·Î ³¡³ª´Â ÆÄÀÏÀ» ÀÛ¼º½Ã ȤÀº ÆíÁý½Ã ÆøÀ» 78À¸·Î ¼³Á¤ÇÑ´Ù. ÀÌ´Â " 80 column ÀÌ ³Ñ°Ô µÇ¸é ÀÚµ¿À¸·Î EnterÀ» ³Ö¾î ÁØ°Í°ú °°Àº È¿°ú¸¦ ³½´Ù. "============================================================================== au BufNewFile,BufRead *.txt set textwidth=78 "============================================================================== " search ½Ã ÆÄÀÏÀÇ ¸Ç³¡±îÁö ´Ù ã°í ³­µÚ ´Ù½Ã ÆÄÀÏÀÇ Ã³À½À¸·Î µ¹¾Æ°¡¼­ ãÀ»¼ö " ÀÖ°Ô ÇØÁÖ´Â °ÍÀÌ´Ù. ±âº»°ªÀº on ÀÌ´Ù. "============================================================================== set nowrapscan "============================================================================== " ÇöÀç Ä¿¼­°¡ ÀÖ´Â ¶óÀÎÀ» ÇÏÀ̶óÀÌÆà ÇØ ÁØ´Ù. "============================================================================== set cursorline "============================================================================== " ÇöÀç ÁøÇàÁßÀÎ ¸í·É¾î ¸®½ºÆà "============================================================================== set showcmd "============================================================================== "¸ÅÅ©·Î ½ÇÇàÁß¿¡ È­¸éÀ» ´Ù½Ã ±×¸®Áö ¾ÊÀ½ "============================================================================== set lz "============================================================================== " ÇÁ·Î±×·¥ ½ÃÀ۽à Ç÷¯±×ÀÎ ·Îµå "============================================================================== set lpl "============================================================================== " »ö±ò ¼³Á¤ " À©µµ¿ìÀÇ °æ¿ì´Â MS, MSB¶ó´Â »õ·Î¿î µÎ°¡Áö »ö±òÀ» Á¤ÀÇ Çؼ­ »ç¿ëÇÑ´Ù. " hi Search term=reverse ctermbg=11 " hi Todo term=standout ctermfg=0 ctermbg=11 "============================================================================== if has("unix") hi LineNR term=standout ctermfg=4 ctermbg=7 hi FoldColumn ctermfg=DarkBlue ctermbg=7 hi CursorLine ctermbg=Yellow guibg=Yellow term=NONE cterm=NONE term=reverse ctermfg=Black " bold off hi NonText cterm=NONE hi ErrorMsg cterm=NONE hi ModeMsg cterm=NONE hi StatusLine term=REVERSE cterm=NONE ctermfg=Yellow ctermbg=black hi VisualNOS term=NONE cterm=NONE hi Error cterm=NONE hi Statement ctermfg=DarkCyan hi DiffDelete term=NONE cterm=NONE hi DiffText cterm=NONE " hi DiffText term=reverse ctermbg=1 ctermfg=0 hi DiffAdd term=bold ctermbg=DarkCyan ctermfg=0 hi DiffChange term=bold ctermbg=5 ctermfg=0 hi DiffDelete ctermfg=4 ctermbg=DarkCyan ctermfg=0 elseif has ("win32") " MS À©µµ¿ì ¹öÆ° ±âº» »ö±òÀΠȸ»öÀ¸·Î ÁöÁ¤ " 212 208 200 MS #D4D0C8 " 199 199 199 MSB #C7C7C7 hi Normal guibg=#D4D0C8 guifg=Black hi NonText guibg=#C7C7C7 guifg=Black gui=NONE hi Visual guibg=Black guifg=grey69 hi LineNr guibg=#C7C7C7 guifg=Blue hi Folded guibg=DarkYellow guifg=Black hi FoldColumn guibg=#C7C7C7 guifg=Blue hi StatusLine guibg=Yellow guifg=black gui=reverse hi Cursor guibg=Black guifg=white hi CursorIM guibg=Purple guifg=Black hi CursorLine ctermbg=Yellow guibg=Yellow term=NONE cterm=NONE term=reverse ctermfg=Black " bold off hi MoreMsg gui=NONE hi ModeMsg gui=NONE hi Question gui=NONE hi Title gui=NONE hi VisualNOS gui=NONE hi DiffText gui=NONE hi DiffDelete gui=NONE hi Statement gui=NONE hi Type gui=NONE endif "============================================================================== " ¸ÅÅ©·Î ¼³Á¤ "============================================================================== " Ä÷¯¸µµÈ html ¸¸µé±â com! Html :so $VIMRUNTIME/syntax/2html.vim " ´ÙÀ½ ¿¡·¯ ¹× ÀÌÀü¿¡·¯ ³­°÷À¸·Î °¡±â map :cn imap :cn " ¾Æ·¡ Å°´Â ¾È¸Ô´Â´Ù. map :cp imap :cp " - ÁÙ ³¡¿¡ ÁÖ¼®À» ´õÇÑ´Ù. map a/**/ imap /**/ "" - ÅÇÀ» ´õÇÑ´Ù. map i imap i " g] ¸ðµç ű׸¦ º¸°í ±×Áß¿¡¼­ °í¸¥´Ù. :sts ¿Í ºñ½Á map g] imap g] " MS-WINDOWS ¿¡¼­ â Å©±â ÃÖ´ëÈ­ Çϱâ "" - :simalt~x if has("unix") elseif has("win32") map :simalt~x imap :simalt~x endif " ½ÃÀ۽à ȭ¸é Å©±â Á¶Á¤ if has ("win32") " au GUIEnter * simalt ~x set lines=82 set columns=104 endif " - :retab map :retab:w imap :retab:wa " - :set fileformat=unix if has("unix") map :set ff=unix:w imap :set ff=unix:wa elseif has("win32") map :set ff=dos:w imap :set ff=dos:wa endif " ÀÚµ¿À¸·Î Makefile ¸¦ ã¾î¼­ ÄÄÆÄÀÏ ÇÑ´Ù. if has("unix") nmap :make:cwin " set makeprg=make\ %< au BufNewFile,BufRead *.c if !filereadable("Makefile") && !filereadable("GNUmakefile") && !filereadable("makefile") | \ set makeprg=gcc\ -Wall\ -ggdb\ -I.\ -L.\ %\ -o\ %< | \ endif au BufNewFile,BufRead *.cpp if !filereadable("Makefile") && !filereadable("GNUmakefile") && !filereadable("makefile") | \ set makeprg=g++\ -Wall\ -ggdb\ -I.\ -L.\ %\ -o\ %< | \ endif endif " :Sexplorer command ½Ã¿¡ vertical ·Î È­¸éÀ» ³ª´©¸é¼­ explorerÀ» º¸¿© ÁØ´Ù. let explVertical=1 let netrw_browse_split=2 let netrw_altv = 1 let netrw_keepdir = 0 let netrw_menu = 0 " È­¸éÀÇ Å©±â¸¦ µ¿ÀÏÇÏ°Ô ÇÑ´Ù. let g:explWinSize="" " È­¸éÀ» ºÐÇÒ ÇÒ¶§ ¿À¸¥ÂÊ¿¡ »õ È­¸éÀÌ ¿À°Ô ÇÑ´Ù. let g:explSplitRight=1 " µð·ºÅ丮 ¸®½ºÆÃÀ» ÇÒ Àû¿¡ ±âº» °ªÀ» ÀÚ¼¼ÇÏ°Ô ¸®½ºÆà ÇÒ¼ö ÀÖµµ·Ï ÇÑ´Ù. "let g:explDetailedList=1 " help updatetime 0.1ÃÊ set updatetime=1000 " jsboard ¼öÁ¤½Ã template ÆÄÀÏÀ» php ·Î ÀÎ½Ä ÇÑ´Ù. au BufNewFile,BufRead *.template set ft=php au BufNewFile,BufRead *.ph set ft=php " ¿À¶óŬ proc ¼³Á¤ au BufNewFile,BufRead *.pc so ~/.vim/syntax/proc.vim " :Man ¸Ç ÆäÀÌÁö¸¦ º¼¼ö ÀÖ°Ô ÇØ ÁØ´Ù.. runtime ftplugin/man.vim " SQL Loader »ç¿ë½Ã control ÆÄÀÏÀ» À§Çؼ­ au BufNewFile,BufRead *.ctl set ft=plsql " ÀÚµ¿À¸·Î fold µÈ »óŸ¦ ÀúÀåÇÑ´Ù. au BufWinLeave *.c mkview au BufWinEnter *.c silent loadview " À¥ÆäÀÌÁö¿¡ ´ëÇÑ Àε§Å×À̼ÇÀ» 2·Î Á¶Á¤ÇÑ´Ù au BufNewFile,BufRead *.jsp,*.php,*.ph,*.html,*.htm,*.css,*.js set sw=2 sts=2 " backspace °¡ Å͹̳ο¡¼­ ·Î ¹ÙÀεùµÇ¾îÀÖÀ»¶§ ·Î ¹ÙÀεùÇÑ´Ù. " :help fixdel :help terminal-options set t_kb= set t_kD= " ÀÔ·Â ¸ðµå À϶§ Ä¿¼­ ¿òÁ÷ÀÓÀ» ALT+jkhl ·Î Á¶Á¤ ÇÑ´Ù. imap gj imap gk imap imap " Å͹̳ο¡¼­ ¸¶¿ì½º Æ÷ÀÎÅÍ¿¡ µû¶ó Á¦¾îµÇ´Â°ÍÀ» ¸·´Â´Ù.(vim 7.1) set mouse="" "============================================================================== " È®Àå ¸ÅÅ©·Î ¼³Á¤ "============================================================================== "============================================================================== " bufexplrer ÀÌ ·Îµù¾ÈµÇ°Ô ÇÑ´Ù. "============================================================================== let loaded_bufexplorer = 0 " bufexplrer ÀÌ ·Îµù¾ÈµÇ°Ô ÇÑ´Ù. let loaded_winmanager = 0 " winmanager ÀÌ ·Îµù ¾ÈµÇ°Ô ÇÑ´Ù. "============================================================================== " EnhancedCommentify ¿¡ ´ëÇÑ ¼³Á¤ help EnhancedCommentify "============================================================================== "let g:EnhCommentifyRespectIndent = 'yes' "let g:EnhCommentifyPretty = 'yes' "let g:EnhCommentifyUseBlockIndent = 'yes' "let g:EnhCommentifyAlignRight = 'yes' nmap Traditionalj imap Traditionalji vmap Traditionalj "============================================================================== " Taglist ¿¡ ´ëÇÑ ¼³Á¤ "============================================================================== " Tlist °¡ »ç¿ëÇÏ´Â ctags ¸¦ ¼³Á¤(gentoo ¿¡¼­ ctags °¡ ´Ù¸¥ À̸§À¸·Î ¼³Ä¡µÊ) "let Tlist_Ctags_Cmd = 'exuberant-ctags' let Tlist_Compact_Format = 1 let Tlist_File_Fold_Auto_Close = 1 let Tlist_Enable_Fold_Column = 0 let Tlist_Show_One_File = 1 " Tlist °¡ °¡·Î·Î ¿­¸®°Ô ¸¸µç´Ù. "let Tlist_Use_Horiz_Window = 0 " Tlist ÀÇ ±âº»Àº 30 let Tlist_WinWidth = 25 "let Tlist_Inc_WinWidth = 0 " Tlist ¸¦ Á»´õ Æí¸®ÇÏ°Ô Á¶Á¤ÇÑ´Ù. function! MyTlist() exe 'Tlist' if exists('g:MyTlist') && g:MyTlist == 1 let g:MyTlist = 0 " exe ': =' " exe 'vert resize ' else let g:MyTlist = 1 exe 'vert resize 93' endif endfunction "nnoremap :Tlist nnoremap :call MyTlist() "============================================================================== " Cscope ¿¡ ´ëÇÑ ¼³Á¤ "============================================================================== " C-] ¸¦ tags °¡ »ç¿ëÇϵµ·Ï ÇÑ´Ù. set cscopetag set tags+=./tags set tagbsearch set csto=1 "============================================================================== " shell script ¿¡ ´ëÇÑ cms ¼³Á¤ "============================================================================== "au FileType sh,csh set cms=\ #%s "============================================================================== " Å×½ºÆ® "============================================================================== " ÀÚµ¿À¸·Î }´Ý´Â ¸ÅÅ©·Î "au BufNewFile,BufRead *.c imap { {}O "au BufNewFile,BufRead *.c imap ( ( ) " ¸Þ´º ¹× ¸Þ¼¼Áö¸¦ ´Ù¸¥¾ð¾î·Î Ç¥Çö(ÀÎÄÚµù¿¡´Â ÀüÇô ¿µÇâÀÌ ¾øÀ½) "source $VIMRUNTIME/delmenu.vim "set langmenu=none "source $VIMRUNTIME/menu.vim "lan en-us "set shm="" " "|[_CTRL-I| [ CTRL-I jump to first line in current and included " files that contains the word under the " cursor, start searching at beginning of " current file "/* " * vim:set ts=8 sts=4 sw=4 : " * vim600:fdm=marker fdl=1 fdc=3 noet: " */ set modeline