Created
April 21, 2015 12:57
-
-
Save deptno/f2f6ddc096243f79ab9d to your computer and use it in GitHub Desktop.
.vimrc [osx]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set autoindent " 자동으로 들여쓰기를 한다. | |
set cindent " C 프로그래밍을 할때 자동으로 들여쓰기를 한다. | |
set smartindent " 좀더 똑똑한 들여쓰기를 위한 옵션이다. | |
"set textwidth=79 " 만약 79번째 글자를 넘어가면 | |
set wrap " 자동으로 를 삽입하여 다음 줄로 넘어간다. | |
set nowrapscan " 검색할 때 문서의 끝에서 다시 처음으로 돌아가지 않는다. | |
set nobackup " 백업 파일을 만들지 않는다. | |
set visualbell " 키를 잘못눌렀을 때 삑 소리를 내는 대신 번쩍이게 한다. | |
set ruler " 화면 우측 하단에 현재 커서의 위치(줄,칸)를 보여준다. | |
set shiftwidth=4 " 자동 들여쓰기를 할때 4칸 들여쓰도록 한다. | |
set tabstop=4 " Tab을 눌렀을 때 8칸 대신 4칸 이동하도록 한다. | |
au Bufenter *.\(js\|html\|css\) set et " js, html, css를 편집할때는 tab을 space로 변환한다. | |
set background=dark | |
set number | |
set csprg=/usr/bin/cscope | |
set csto=1 " ctag사용시 cscope 사용 | |
set nocsverb " 에러출력 x | |
set lazyredraw | |
set hlsearch | |
set fencs=utf-8,euc-kr,cp949,cp932,euc-jp,shift-jis,big5,latin1,ucs-2le | |
"hdr1000s | |
"map <F12> :!make ap_web -C/home/bglee/code/hdr1000s/apps/make<CR> | |
"hms1000s | |
map <F12> :!make ap_web -C/home/bglee/code/hms1000s/apps/make<CR> | |
map <F10> :!find . -name '*.swp' -exec rm -f {} \;<CR> | |
map <F11> :!make ap_browser -C/home/bglee/code/hdr1000s/apps/make<CR> | |
map <F3> $v%zf | |
"map <F4> :TagbarToggle<CR> | |
map <F4> :w<CR>:make<CR>:cc<CR> | |
"map <F4> :!egrep -rn <cword> * -exclude-dir=.svn<CR> | |
map <F6> :r!cat /home/bglee/bin/commit_template.txt<CR>ggdd/MODULE_NAME<CR> | |
"map <F6> ofprintf(stderr, "\x1b[0;%dm[ %-15s \| %-4d \| %d \| %-15s \| PID : %5d ] \x1b[0m\n", 36, __FUNCTION__, __LINE__, 2, __FILE__, getpid());<ESC> | |
map <F9> :BufExplorer<CR> | |
map <C-h> <ESC>I//<ESC><CR> | |
map <C-p> <ESC>I/*<ESC>A*/<ESC><CR> | |
map <C-\> :!svndiff.sh %<CR> | |
"jQeury syntax | |
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery | |
"" Special for Javascript | |
" TODO: - Add colors to the cterm | |
hi javaScriptBrowserObjects guifg=#DBB6D2 ctermfg=182 gui=italic | |
hi javaScriptDOMObjects guifg=#DBB6D2 gui=BOLD | |
hi javaScriptDOMMethods guifg=#D4FA9B ctermfg=192 | |
hi link javaScriptDOMProperties Keyword | |
hi javaScriptAjaxObjects guifg=#5d91d3 gui=underline | |
hi javaScriptAjaxMethods guifg=#6699CC ctermfg=68 | |
hi javaScriptAjaxProperties guifg=#FF9494 ctermfg=210 | |
hi javaScriptFuncName guifg=#B5E4F7 ctermfg=153 | |
hi javaScriptHtmlElemProperties guifg=#FF9494 ctermfg=210 | |
hi javaScriptEventListenerKeyword guifg=#6699CC ctermfg=68 | |
" TagList | |
let Tlist_Auto_Open=0 | |
let Tlist_Enable_Fold_Column = 1 | |
let Tlist_Use_Right_Window=1 | |
let Tlist_Compact_Format=1 | |
let Tlist_WinWidth=28 | |
let Tlist_Exit_OnlyWindow=1 | |
let Tlist_File_Fold_Auto_Close = 1 | |
let winManagerWindowLayout='FileExploer|TagList' | |
let Tlist_Auto_Highlight_Tag=1 | |
let Tlist_Compact_Format =1 | |
let Tlist_Show_Menu=1 | |
let Tlist_Sort_Type='name' | |
" NERDTree | |
map <F2> :NERDTreeToggle<CR> | |
let NERDTreeIgnore=['.o$'] | |
let NERDTreeIgnore=['.h$'] | |
" Source Explorer | |
nmap <F5> :SrcExplToggle<CR> | |
let g:SrcExpl_winHeight = 8 | |
let g:SrcExpl_refreshTime = 100 | |
let g:SrcExpl_jumpKey = "<ENTER>" | |
let g:SrcExpl_gobackKey = "<SPACE>" | |
let g:SrcExpl_pluginList = ["__Tag_List__", | |
\"_NERD_tree_", | |
\"Source_Explorer"] | |
let g:SrcExpl_searchLocalDef = 1 | |
let g:SrcExpl_isUpdateTags = 0 | |
" let g:SrcExpl_updateTagsCmd = "ctags --sort=foldcase -R ." | |
" let g:SrcExpl_updateTagsKey = "<F8>" | |
" cscope + | |
if filereadable("./cscope.out") | |
cs add cscope.out | |
" else | |
" cs add /home/oh7/lkp/kernel_source/linux-2.6.37/cscope.out | |
endif | |
func! Css() | |
let css = expand("<cword>") | |
new | |
exe "cs find s ".css | |
endfunc | |
nmap ,css :call Css()<cr> | |
func! Csc() | |
let csc = expand("<cword>") | |
new | |
exe "cs find c ".csc | |
endfunc | |
nmap ,csc :call Csc()<cr> | |
func! Csd() | |
let csd = expand("<cword>") | |
new | |
exe "cs find d ".csd | |
endfunc | |
nmap ,csd :call Csd()<cr> | |
func! Csg() | |
let csg = expand("<cword>") | |
new | |
exe "cs find g ".csg | |
endfunc | |
nmap ,csg :call Csg()<cr> | |
func! Cst() | |
let cst = expand("<cword>") | |
new | |
exe "cs find t ".cst | |
endfunc | |
nmap ,cst :call Cst()<cr> | |
" cscope - | |
" ctag + | |
if filereadable("./tags") | |
set tags=tags | |
else | |
set tags=/home/oh7/lkp/kernel_source/linux-2.6.37/tags | |
endif | |
if version >= 500 | |
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> | |
endif | |
" ctag - | |
if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" | |
set t_Co=16 | |
set t_Sf=^[[3%dm | |
set t_Sb=^[[4%dm | |
set t_kb=^H | |
fixdel | |
endif | |
"문법 강조 기능을 사용한다. | |
if has("syntax") | |
syntax on " Default to no syntax highlightning | |
endif | |
filetype plugin on | |
"man page | |
func! Man() | |
let sm = expand("<cword>") | |
exe "!man -S 2:3:4:5:6:7:8:9:tcl:n:l:p:o ".sm | |
endfunc | |
nmap ,ma :call Man()<cr><cr> | |
"buffer | |
map ,1 :b!1<cr> | |
map ,2 :b!2<cr> | |
map ,3 :b!3<cr> | |
map ,4 :b!4<cr> | |
map ,5 :b!5<cr> | |
map ,6 :b!6<cr> | |
map ,7 :b!7<cr> | |
map ,8 :b!8<cr> | |
map ,9 :b!9<cr> | |
map ,0 :b!0<cr> | |
map ,x :bn!<cr> | |
map ,z :bp!<cr> | |
map ,w :bw<cr> | |
execute pathogen#infect() | |
"NeoBundle Scripts----------------------------- | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
" Required: | |
set runtimepath+=/Users/deptno/.vim/bundle/neobundle.vim/ | |
endif | |
" Required: | |
call neobundle#begin(expand('/Users/deptno/.vim/bundle')) | |
" Let NeoBundle manage NeoBundle | |
" Required: | |
NeoBundleFetch 'Shougo/neobundle.vim' | |
" My Bundles here: | |
NeoBundle 'Shougo/neosnippet.vim' | |
NeoBundle 'Shougo/neosnippet-snippets' | |
NeoBundle 'tpope/vim-fugitive' | |
NeoBundle 'kien/ctrlp.vim' | |
NeoBundle 'flazz/vim-colorschemes' | |
NeoBundle 'Shougo/vimproc.vim', { | |
\ 'build' : { | |
\ 'windows' : 'tools\\update-dll-mingw', | |
\ 'cygwin' : 'make -f make_cygwin.mak', | |
\ 'mac' : 'make -f make_mac.mak', | |
\ 'linux' : 'make', | |
\ 'unix' : 'gmake', | |
\ } | |
\ } | |
NeoBundleLazy 'lambdalisue/vim-gista', { | |
\ 'depends': [ | |
\ 'Shougo/unite.vim', | |
\ 'tyru/open-browser.vim', | |
\ ], | |
\ 'autoload': { | |
\ 'commands': ['Gista'], | |
\ 'mappings': '<Plug>(gista-', | |
\ 'unite_sources': 'gista', | |
\}} | |
" You can specify revision/branch/tag. | |
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' } | |
" Required: | |
call neobundle#end() | |
" Required: | |
filetype plugin indent on | |
" If there are uninstalled bundles found on startup, | |
" this will conveniently prompt you to install them. | |
NeoBundleCheck | |
"End NeoBundle Scripts------------------------- | |
"typescript syntax | |
au BufRead,BufNewFile *.ts setf typescript | |
au BufRead,BufNewFile *.ts so ~/.vim/syntax/typescript.vim | |
"javascript syntax | |
au BufRead,BufNewFile *.js setf javascript | |
au BufRead,BufNewFile *.js so ~/.vim/syntax/javascript.vim | |
let g:gista#github_user = 'deptno' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment