Vundle 설치

John Jeong (토론 | 기여)님의 2017년 11월 11일 (토) 10:23 판 (→‎참고)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

Vundle Installation
Vundle 설치
  • git을 통한 Vundle 설치

2 설치[ | ]

2.1 Git clone[ | ]

john@zetawiki:~$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Cloning into '/home/john/.vim/bundle/Vundle.vim'...
remote: Counting objects: 3132, done.
remote: Total 3132 (delta 0), reused 1 (delta 0), pack-reused 3131
Receiving objects: 100% (3132/3132), 932.58 KiB | 804.00 KiB/s, done.
Resolving deltas: 100% (1103/1103), done.
Checking connectivity... done.
  • 홈 디렉토리에 ~/.vim/bundle/Vundle.vim 이 생성 된 것을 확인 할 수 있음
john@ip-172-31-14-226:~$ ll | grep -i .vim/
drwxr-xr-x 3 john john  4096 Nov 11 00:23 .vim/

2.2 .vimrc 설정[ | ]

  • 아래 설정을 .vimrc의 최상단에 위치
  • Plugin "xxxxxx" 로 시작하는 부분이 관리될 플러그인이며 기본 설정은 설명을 위해 활성화 된 부분이므로 주석 처리 해줌
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
  • .vimrc 에서 기본 플러그인을 모두 주석 처리
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
" Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
" Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
" Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

2.3 명령 확인[ | ]

  • .vimrc 파일을 연다음 :plugin을 입력하고 자동 완성 단축키 Ctrl+d를 입력하면 명령 리스트를 볼 수 있음
......
" Pass the path to set the runtimepath properly.
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
:plugin
Plugin         PluginClean    PluginDocs     PluginInstall  PluginList     PluginSearch   PluginUpdate
:plugin

3 플러그인 검색[ | ]

  • PluginSearch를 입력
......
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

" All of your Plugins must be added before the following line
:PluginSearch
  • 좌측 플러그인 리스트 중 원하는 것을 선택
  • yy를 입력하여 플러그인 복사
  • Ctrl+w+w를 입력하여 우측 화면으로 이동
  • p를 입력하여 우측 화면에 복사
  • :wq를 입력하여 .vimrc 저장

3.1 플러그인 설치[ | ]

  • .vimrc를 다시 연 다음 PluginInstall 명령으로 플러그인 설치
  • 아래 예시는 "The-NERD-tree"라는 플러그인 설치
.....
Plugin 'The-NERD-tree'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
:plugin
Plugin         PluginClean    PluginDocs     PluginInstall  PluginList     PluginSearch   PluginUpdate
:PluginInstall
PluginInstall 명령 후 기다리면 자동으로 설치가 됨

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}