"------------------------------------------------------------------------------- " ȯ»ó°æÀÇ Vimrc ¼³Á¤ " Windows, Linux, Mac ¸ðµÎ È£Çѵǵµ·Ï ÇÑÆÄÀÏ·Î ÀÛ¼º " Windows ¿¡¼­´Â ÆÄÀϸíÀ» _vimrc·Î º¯°æ " Linux/Mac ¿¡¼­´Â ÆÄÀϸíÀ» .vimrc·Î º¯°æ " " ¼öÁ¤ÀÏ : 2011. 09. 04 "------------------------------------------------------------------------------- "vim ÇÏ´Ü¿¡ »óÅ ǥ½ÃÁÙ ¿É¼Ç set laststatus=2 set statusline=%<%F%h%m%r%h%w%y\ %{strftime(\"%Y/%m/%d-%H:%M\")}%=\ ascii:%b\ col:%c%V\ pos:%o\ lin:%l\,%L\ %P "¿À¸®Áö³Î vi¿ÍÀÇ È£È¯¼ºÀ» ¾ø¾Ö°í vim¸¸ÀÇ ±â´ÉÀ» ¾²°Ô ÇÏ´Â ¿É¼Ç set nocp "¸í·É¾î È÷½ºÅ丮 ¿É¼Ç set hi=1000 "¹é½ºÆäÀ̽º »ç¿ë set bs=indent,eol,start "Ä¿¼­ÀÇ À§Ä¡¸¦ Ç×»ó º¸ÀÌ°Ô ÇÔ. set ru "¿©·¯°¡Áö À̵¿ µ¿À۽à ÁÙÀÇ ½ÃÀÛÀ¸·Î ÀÚµ¿ À̵¿ set sol "»ç¿ëÀÚ °ýÈ£ ã±â¸¦ »ç¿ëÇÑ´Ù. set mps+=<:> "°Ë»ö¾î °­Á¶ ±â´É set hls "¶È¶ÈÇÑ ´ë¼Ò¹®ÀÚ ±¸º° ±â´É »ç¿ë set scs " UTF-8, euc-kr Çѱ۹®¼­ ±×³É ¿­±â if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" set encoding=utf-8 set fileencodings=utf-8,cp949 endif "ÅÇ Å©±â ¼³Á¤ / ÅÇ ±æÀÌ / µé¿©¾²±â ÅÇ °£°Ý set ts=4 "tabstop set sts=4 "softtabstop set sw=4 "shiftwidth "ÆÄÀÏ Çü½Ä¿¡ µû¸¥ Syntax Highlighting ±â´ÉÀ» ÄÒ´Ù syntax on "ÀÚµ¿ µé¿©¾²±â¸¦ ÇÑ´Ù. set smartindent set ai "autoindent "C¾ð¾î ÀÚµ¿ µé¿©¾²±â ¿É¼Ç set cindent "ºÙ¿©³Ö±â½Ã µé¿©¾²±â ¿©ºÎ ¼±Åà InsŰ·Î paste»óÅÂ¿Í nopaste»óÅ Àüȯ set pastetoggle= "vim Colorscheme set bg=dark "color desert "color motus "------------------------------------------------------------------------------- "Æúµù ¿É¼Ç ¼³Á¤ "------------------------------------------------------------------------------- " Æú´õ ¼³Á¤ÀÌ µÇ¾î ÀÖ´Â ÆÄÀÏÀ» ¿­¾úÀ»¶§ Æú´õ µÇ¾î ÀÖ´Â ·¹º§À» ¼³Á¤ÇÑ´Ù. " ±âº»°ª 0ÀÌ°í ¸ðµÎ ÆúµùµÈ´Ù. set fdl=1 " ¼Ò½ºÆÄÀÏÀÌ Æúµù µÇ¾î ÀÖÀ»¶§ Æúµù¹üÀ§¸¦ º¸¿©ÁÖ´Â Ä÷³ÀÇ ¼ö¸¦ ¼³Á¤ÇÑ´Ù. set fdc=1 " ´Ý´Â °ýÈ£")", ºê¶óÄÏ"}"À» ÀԷ½à ¸ÅĪµÇ´Â ¿©´Â °ýÈ£, ºê¶óÄÏ¿¡ Àá½Ã " Ä¿¼­°¡ À§Ä¡Çß´Ù°¡ ´Ù½Ã Á¦ÀÚ¸®·Î µ¹¾Æ ¿Â´Ù. set showmatch "------------------------------------------------------------------------------- "gVim ¼³Á¤ "------------------------------------------------------------------------------- if has("gui_running") "Åø¹Ù¸¦ º¸ÀÌÁö ¾Ê°Ô ÇÑ´Ù. set go-=T "½ºÅ©·Ñ¹Ù¸¦ Ç¥½ÃÇÏÁö ¾Ê´Â´Ù set go-=l set go-=L set go-=r set go-=R set go-=b "gVim¿¡¼­ ¸¶¿ì½º ÀÛµ¿ ¼³Á¤ set mousem=popup "--------------------------------------------------------------------------- "ÆùÆ® ¼³Á¤ if has("win32") || has("win64") "set guifont=Monaco:h11:cANSI "set guifont=Dejavu_Sans_Mono:h11:cANSI set guifont=³ª´®°íµñÄÚµù:h11:cHANGEUL elseif has("gui_gtk") "set guifont=Monaco\ 12 set guifont=Dejavu\ Sans\ Mono\ 9 elseif has("gui_macvim") "set guifont=Monaco:h11 set guifont=³ª´®°íµñÄÚµù:h14 endif "--------------------------------------------------------------------------- "gVim È­¸é Å©±â ¼³Á¤ set lines=40 set co=85 "gVim colorscheme ¼³Á¤ colorscheme desert endif "------------------------------------------------------------------------------- "ÆÄÀÏ È®ÀåÀÚ¿¡ µû¸¥ Â÷º° ¿É¼Ç "------------------------------------------------------------------------------- filetype on filetype plugin indent on au FileType perl,ruby,clojure,objc,python,java,c,cpp,cs,html set nu au FileType css,php,php4,css,jsp,sh set nu au FileType html,css,javascript set ts=2, sts=2, sw=2 "------------------------------------------------------------------------------- "vim-ruby Setting "------------------------------------------------------------------------------- compiler ruby au FileType ruby set tabstop=2 au FileType ruby set shiftwidth=2 au FileType ruby set softtabstop=2 au FileType ruby map : !ruby % "------------------------------------------------------------------------------- "Key Mapping Setting "------------------------------------------------------------------------------- "Whitespace Line Insert Mapping "------------------------------------------------------------------------------- map .j o map .k O map .ti i w "------------------------------------------------------------------------------- "To HTML "------------------------------------------------------------------------------- map .th : TOhtml "------------------------------------------------------------------------------- "Shell Script Running "------------------------------------------------------------------------------- au FileType sh map : !chmod +x % au FileType sh map : !./% "------------------------------------------------------------------------------- "C Compiler Mapping "------------------------------------------------------------------------------- au FileType c map : !gcc -W -Wall -o %< % au FileType c map : !./%< "------------------------------------------------------------------------------- "C++ Compiler Mapping "------------------------------------------------------------------------------- au FileType cpp map : !g++ -W -Wall -o %< % au FileType cpp map : !./%< "------------------------------------------------------------------------------- "Python Mapping "------------------------------------------------------------------------------- au FileType python map : !python % au FileType python set expandtab au FileType python set smarttab au FileType python set textwidth=80 "------------------------------------------------------------------------------- "Java Compiler Mapping "------------------------------------------------------------------------------- au FileType java map : !javac % au FileType java map : !java %< au FileType java map : !appletviewer %< "------------------------------------------------------------------------------- "Objective C Compiler Mapping "------------------------------------------------------------------------------- let filetype_m='objc' au FileType objc map : !gcc -framework Foundation % -o %< au FileType objc map : !./%< "------------------------------------------------------------------------------- "Perl excute Mapping "------------------------------------------------------------------------------- au FileType perl map : !perl -w % "------------------------------------------------------------------------------- " Node Mapping "------------------------------------------------------------------------------- au FileType javascript map : !node %