-
vundle 설치Programming/Linux 2014. 11. 7. 23:17728x90
vim을 사용하면서 여러 plugin을 추가해서 사용할 수 있는데, 이 plugin을 관리하는 것이 vundle이라는 plugin이다.
누가 개발했는지 몰라도 정말 좋다 (특히 여러 plugin을 install, uninstall하는 과정이 쉽기 때문에..)
vundle설치는 다음과 같다.
먼저 기존에 사용하던 .vim관련 파일을 지워줘야 한다.
$ rm -rf .vim*
그리고 git clone을 통해 vundle을 다운 받자.
$ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
이렇게 하면 해당 git으로 부터 vundle을 복사해온다. (2014.11.07기준)
다음 .vimrc을 열어서 아래와 같이 붙여 넣어준다.
set nocompatible " be iMproved, required
filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/vundle/ call vundle#rc() " alternatively, pass a path where Vundle should install bundles "let path = '~/some/path/here' "call vundle#rc(path) " let Vundle manage Vundle, required Bundle 'gmarik/vundle' " The following are examples of different formats supported. " Keep bundle commands between here and filetype plugin indent on. " scripts on GitHub repos Bundle 'tpope/vim-fugitive' Bundle 'Lokaltog/vim-easymotion' Bundle 'tpope/vim-rails.git' " The sparkup vim script is in a subdirectory of this repo called vim. " Pass the path to set the runtimepath properly. Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} " scripts from http://vim-scripts.org/vim/scripts.html Bundle 'L9' Bundle 'FuzzyFinder' " scripts not on GitHub Bundle 'git://git.wincent.com/command-t.git' " git repos on your local machine (i.e. when working on your own plugin) Bundle 'file:///home/gmarik/path/to/plugin' " ... filetype plugin indent on " required
위의 파일을 붙여 넣고 나와서 :wq! 로 저장을 하고 다시 vim을 열어 명령창에 다음과 같이 입력해본다.
:bun 을 누르고 탭을 눌러보면 bunload라고 나오는데 이러면 대부분 설치 된 것이다.
이제 bundle list에서 가져와야되는데 아래와 같은 명령어를 입력한다.
:BundleSearch
해당 명령어를 입력하면 기존의 vim창이 vs로 나뉘면서 왼쪽에 bundle들이 나타난다.
자신이 설치하고 싶은 plugin을 찾으면 .vimrc에 해당 부분을 복사해서 넣으면 된다.
그리고나서 :Bundleinstall 해주면 자동설치가 된다.
단, 위에서도 보았지만, bundle이 특정 위치 안에 있어야한다. 저기 위의 구문에서는 " Bundle 'gmarik/vundle' " 와 " filetype plugin indent on " 사이에 자신이 install할 bundle을 넣어두면 된다.
그리고 vundle마다 map을 이용해서 key mapping을 하게 되는 그 부분은 해당 vim github가면 자세히 나와있다.
이번편에서는 vundle을 설치했으니, 다음에는 유용한 plugin을 하나씩 소개해 볼까 한다.
'Programming > Linux' 카테고리의 다른 글
macbook mail에서 수신은 되고 발송이 되지 않을때! (0) 2015.02.01 putty의 글자색 그래도 복사하여 가져오기 (0) 2014.12.31 jar파일 터미널에서 실행시키기 (0) 2014.04.09 mac에서 특정 실행파일 path 잡아주기 (0) 2014.04.09 mac 터미널 색 변경 (0) 2013.11.10