ãããããã£ããvimã使ããdotfilesã®github管çã¨vundleã®å°å ¥ã
vimã使ãå§ãã¦æ«ãçµã¤ã®ã ãããªããªãåå¿è
ã¬ãã«ãæããããªãã
ãããããã£ããvimã使ã£ã¦ã¿ããã¨æãã
èããã¨ãããdotfiles(.vimrcãªã©)ã¯githubã§ç®¡çããã¨ä¾¿å©ãããã
ã¾ããvimã®pluginã¯vundleã§ç®¡çããã®ããã¦ããããã
ä»åã¯ãã®äºã¤ãå®éã«è¡ã£ã¦ã¿ãã
ãªããdotfilesã¯Windowsã¨Macã§å
±æããã
ç®æ¬¡
ã»vundleã¨ã¯
ã»ç®çã¨æ¹é
ã»dotfilesã®ç®¡çã¨vundleã®å°å
¥
ã»vundleãå©ç¨ãããã©ã°ã¤ã³ã®ã¤ã³ã¹ãã¼ã«
vundleã¨ã¯
ãããããvundleã¨ã¯ä½ãã
ç°¡åã«è¨ãã¨ãvimã®pluginã管çããpluginã§ããã
Rubyã®Bundlerã«å½±é¿ãåããããããï¼å人çã«ããããã¤ã³ãé«ãã£ããï¼
ç¹å¾´ã¯ãpluginã.vimrcã§ç®¡çãããã¨ã
.vimrcã«å¿
è¦ãªæ
å ±ãæ¸ãã¦ããã°ãvimã®ã³ãã³ãã§pluginã®å°å
¥åã³æ´æ°ãã§ããã
ã¾ããã£ã¬ã¯ããªãpluginãã¨ã«é
ç½®ããã管çããããã
ç®çã¨æ¹é
ä»åã®ç®çã¯äºã¤ã
ã»Macã¨Windowsã§dotfilesãå
±æããgithubã§ç®¡çãããã¨ã
ã»pluginãvundleã§ç®¡çãããã¨ã
ãã®ããã«ãWindowsã®ãã¡ã¤ã«åã§githubã§ç®¡çããã
Macã§ã¯å
¨ã¦ã·ã³ããªãã¯ãªã³ã¯ãä½æããã
ã¤ã¾ããå·®ç°ã¯æè»ãªæ¹ï¼Macï¼ã§å¸åããã
ãã®æ¹ããä½ãåé¡ããã£ãã¨ãã«å¯¾å¿ããããã
dotfilesã®ç®¡çã¨vundleã®å°å ¥
ä¸è¨æ¹éã®éãã.*rcãgithub管çç¨ãã©ã«ãã«ç§»åãã¦ã·ã³ããªãã¯ãªã³ã¯ãä½æããã
ã¤ã¡ã¼ã¸ããããããã«ãæçµçãªãã£ã¬ã¯ããªæ§æãå
ã«æ示ãããï¼ä¸çªå·¦ã¯$HOMEã§ãä½è¨ãªãã¡ã¤ã«ã¯ï¼
ã¯ããã«ãã¿ã¼ããã«ãèµ·åãã¦ãã£ã¬ã¯ããªã¨ã·ã³ããªãã¯ãªã³ã¯ã®ä½æãè¡ãã
mkdir ~/dotfiles mv ~/.vimrc ~/dotfiles/_vimrc mv ~/.gvimrc ~/dotfiles/_gvimrc ln -s ~/dotfiles/_vimrc ~/.vimrc ln -s ~/dotfiles/_gvimrc ~/.gvimrc
次ã«ãgithubã®webã§ãªãã¸ããªdotfilesãä½æããã
githubã®ä½¿ãæ¹ã«ä¸å®ãããã°ããã¡ããåç
§ã®ãã¨ã
gitとgithubを使ってみる - holyppの日記
ãã®å¾ãåã³ã¿ã¼ããã«ã«æ»ãã
#dotfilesãgithubã§ç®¡çããã cd ~/dotfiles git init touch README git add README git add _vimrc git add _gvimrc git commit -m 'first_commit' #vundleãå°å ¥ããã git submodule add http://github.com/gmarik/vundle.git ~/dotfiles/vimfiles/vundle.git git commit -m 'add_vundle' git push origin master #pluginãã£ã¬ã¯ããªã®ã·ã³ããªãã¯ãªã³ã¯ãä½æããã ln -s ~/dotfiles/vimfiles ~/.vim
vundleãå©ç¨ãããã©ã°ã¤ã³ã®ã¤ã³ã¹ãã¼ã«
.vimrc(~/dotfiles/_vimrc)ã«ä¸è¨ã®éã追è¨ããã
set nocompatible filetype off set rtp+=~/vimfiles/vundle.git/ #vundleã®ãã£ã¬ã¯ã㪠call vundle#rc() Bundle 'Shougo/neocomplcache' #Bundle...ã¯ä½¿ç¨ãããã©ã°ã¤ã³ãæ¸ãã詳細ã¯guthubã®READMEã詳ããã Bundle 'Shougo/unite.vim' Bundle 'thinca/vim-ref' Bundle 'thinca/vim-quickrun' filetype plugin indent on " required!
vimãèµ·åãã³ãã³ããæã¤ã¨ãèªåã§ã¤ã³ã¹ãã¼ã«ãããã
:BundleInstall
ãªããæ´æ°ããå ´åã¯ï¼ãã¤ãããï¼:BundleInstall!
ä¸è¨ã®ãã°ãåºåãããã°æåã
Installed bundles: neocomplcache unite.vim vim-ref vim-quickrun Helptags: done. 4 bundles processed
ãããã®pluginã¯githubã§ç®¡çããªããã.gitignoreãä½æããã
vi ~/dotfiles/.gitignore #ãã¡ã¤ã«ã«ã¯ï¼è¡ã ãæ¸ãã¦ä¿åããã /vimfiles/bundle/ #è¤æ°PCã§åæãã¨ããã.gitignoreã管çããã git add .gitignore git commit -m 'add_gitignore' git push origin master
ããã¾ã§ã§ãMacå´ã®æºåã¯å®äºã¨ãªãã
Windowså´ã®ä½æ¥ã¨ãvundleã§ãããå種pluginã®è¨å®ã«é¢ãã¦ã¯å¥éè¨è¼äºå®ã
å¥éâそろそろしっかりvimを使う。github+vundleを利用したWindowsとの同期。 - holyppの日記