Last active
December 21, 2015 06:48
-
-
Save kgcrom/6266395 to your computer and use it in GitHub Desktop.
vim으로 Go 개발하기
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
" This file needs to be copied to your home dir, instead of staying here. It should live at ~/.vimrc | |
set number | |
set nocompatible " be iMproved | |
filetype off " required! | |
set expandtab | |
set ts=2 | |
set sw=2 | |
set rtp+=~/.vim/bundle/Vundle.vim/ | |
set rtp+=$GOROOT/misc/vim | |
"set rtp+=$GOPATH/src/github.com/golang/lint/misc/vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'fatih/vim-go' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'majutsushi/tagbar' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'jstemmer/gotags' | |
Plugin 'nsf/gocode' | |
call vundle#end() | |
filetype plugin indent on " required! | |
syntax on | |
au BufWritePost *.go silent! !ctags --recurse=yes | |
au FileType go nmap <Leader>ds <Plug>(go-def-split) | |
au FileType go nmap <Leader>dv <Plug>(go-def-vertical) | |
au FileType go nmap <Leader>dt <Plug>(go-def-tab) | |
"au BufWritePost *.go silent! %!goimports | |
"let NERDTreeDirArrows=0 | |
let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py" | |
let g:tagbar_type_go = { | |
\ 'ctagstype' : 'go', | |
\ 'kinds' : [ | |
\ 'p:package', | |
\ 'i:imports:1', | |
\ 'c:constants', | |
\ 'v:variables', | |
\ 't:types', | |
\ 'n:interfaces', | |
\ 'w:fields', | |
\ 'e:embedded', | |
\ 'm:methods', | |
\ 'r:constructor', | |
\ 'f:functions' | |
\ ], | |
\ 'sro' : '.', | |
\ 'kind2scope' : { | |
\ 't' : 'ctype', | |
\ 'n' : 'ntype' | |
\ }, | |
\ 'scope2kind' : { | |
\ 'ctype' : 't', | |
\ 'ntype' : 'n' | |
\ }, | |
\ 'ctagsbin' : 'gotags', | |
\ 'ctagsargs' : '-sort -silent' | |
\ } | |
nmap <F3> :NERDTreeToggle<CR>1 | |
nmap <F5> :make<CR>:copen<CR> | |
" Map Ctrl-c Ctrl-c to open tagbar | |
map <silent> <C-c><C-c> :TagbarOpen fj<Cr> | |
" Map Ctrl-c Ctrl-c to open tagbar | |
map <silent> <C-c><C-x> :TagbarClose<Cr> |
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
"vim 번들 매니저 설치 | |
mkdir ~/.vim/bundle | |
git clone https://github.com/gmarik/Vundle.vim | |
"Ubuntu vim버전 올려야함 | |
refhttp://linuxg.net/how-to-install-vim-7-4-on-debian-based-systems-from-source/ | |
"Mac은 MacVim설치해야함 | |
brew install macvim | |
.profile | |
alias vi='mvim -v' |
http://superuser.com/questions/401413/cant-open-folders-in-linux-nerdtree-vim
NERDTree에서 폴더가 안열리는 문제가 있었는데 위 url로 해결!!!
let NERDTreeDirArrows=0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://blog.gopheracademy.com/vimgo-development-environment 이게 갑!!