突然のパチラッシュに備える - ウロボロスVim -

この記事は Vim Advent Calendar 2012 の 130日目の記事になります。

129日目は @tyruさんの balloon-evalを使ってマウス位置を取得 でした。

いつまで続くのかドキドキですね。Vimmerにクリスマスはくるのか!?
では、今回の記事はこちらになります。

ウロボロス - Wikipedia

はい。自分を食べてますね。
では、Vimから Vimを Build & Installしてみます。(Linuxでしか試してません)
※良い子は真似しないでね。

プロローグ

週10件?は降ってくる Vimパチラッシュ(※要出典)に対応して最新を使いたい。
でも、毎日更新を確認するのもめんどくさいなー
あれ? NeoBundleのヘルプでこんなものが、

  NeoBundle 'Shougo/vimproc', {
  \ 'build' : {
  \     'windows' : 'make -f make_mingw32.mak',
  \     'cygwin' : 'make -f make_cygwin.mak',
  \     'mac' : 'make -f make_mac.mak',
  \     'unix' : 'make -f make_unix.mak',
  \    },
  \ }

もしかして、Vimでもイケるんじゃない!?
って思ったので、試してみました。

準備するもの

一応こちらも。

手順と設定

  • .vimrc
NeoBundle 'https://vim.googlecode.com/hg', {
\ 'type'  : 'hg',
\ 'name'  : 'vim'
\ }

この設定だと「~/.vim/bundle/vim」になります。
.vim配下じゃないほうがいい方は 'name'を変えればいける?

:NeoBundleInstall

これでダウンロードされると思います。
その後は、configure, make, make install行います。

後は、インストールしたディレクトリ(bin)にパスを通せば
先ほどの vim/gvimが使えます。

続いて、.vimrcを以下のようにします。

NeoBundle 'https://vim.googlecode.com/hg', {
\ 'type'  : 'hg',
\ 'name'  : 'vim',
\ 'build' : { 'unix' : 'make; make install' }
\ }

※最初から configure含めて書けばいいことに気づくなど。。。

後は、パチラッシュがくれば、

:Unite neobundle/update

もしくは

:NeoBundleUpdate

これで、いつでも最新Vimが貴方の手のなかです-☆
VimVim

遂にきたパチラッシュ!!!

っていうのを 3/25に書いて、当時(Vim7.3.875)だったのに
いっこうにパチラッシュが来ませんでした。
ヤバい!実験出来ないと思って焦っていたら 4/4 遂にパチラッシュが!!!

ということで、その時のログがこちらです。

:
- [neobundle/install] (47/55): |vim| Updated 
- [neobundle/install] 4249:acf7368a2acc -> 4253:ccbde540a714 
- [neobundle/install] Building...  
- [neobundle/install] Starting make in the src directory.  
- If there are problems, cd to the src directory and run make there 
- cd src && /usr/bin/make first 
- make[1]: Entering directory `/home/kocha/.vim/bundle/vim/src' 
- gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  ..1R6/include -I/usr/include/atk-1.0 -I/usr/include/pan
- gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  ..1R6/include -I/usr/include/atk-1.0 -I/usr/include/pan
- gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  ..1R6/include -I/usr/include/atk-1.0 -I/usr/include/pan
- link.sh: The file 'auto/link.sed' exists, which is going to be used now.  
- link.sh: If linking fails, try deleting the auto/link.sed file.  
- link.sh: If this fails too, try creating an empty auto/link.sed file.  
- link.sh: Using auto/link.sed file to omit a few libraries 
-   gcc  -L/usr/X11R6/lib64   -L.  -rdynamic -Wl,-exp..  -o vim objects/buffer.o objects/blowfish.o objects/
- /usr/lib64/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x3710): In function `posix_tempnam':
- : warning: the use of `tempnam' is dangerous, better use `mkstemp' 
- /usr/lib64/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x37c5): In function `posix_tmpnam':
- : warning: the use of `tmpnam_r' is dangerous, better use `mkstemp' 
- link.sh: Linked fine with a few libraries omitted 
- make[2]: Entering directory `/home/kocha/.vim/bundle/vim/src/po' 
- make[2]: `all' に対して行うべき事はありません。 
- make[2]: Leaving directory `/home/kocha/.vim/bundle/vim/src/po' 
- make[2]: Entering directory `/home/kocha/.vim/bundle/vim/src/po' 
- make[2]: `converted' に対して行うべき事はありません。 
- make[2]: Leaving directory `/home/kocha/.vim/bundle/vim/src/po' 
- make[1]: Leaving directory `/home/kocha/.vim/bundle/vim/src' 
- Starting make in the src directory.  
- If there are problems, cd to the src directory and run make there 
- cd src && /usr/bin/make install 
- make[1]: Entering directory `/home/kocha/.vim/bundle/vim/src' 
- if test -f /home/kocha/.vim/bundle/vim/bin/vim; then \ 
-   mv -f /home/kocha/.vim/bundle/vim/bin/vim /home/kocha/.vim/bundle/vim/bin/vim.rm; \
-   rm -f /home/kocha/.vim/bundle/vim/bin/vim.rm; \
:
(省略)
:
- if test -d /home/kocha/.vim/bundle/vim/share/ico..2332/.vim/bundle/vim/share/icons/locolor/16x16/apps \
-     -a ! -f /home/kocha/.vim/bundle/vim/share/icons/locolor/16x16/apps/gvim.png; then \ 
-    cp ../runtime/vim16x16.png /home/kocha/.vim/bundle/vim/share/icons/locolor/16x16/apps/gvim.png; \
- fi 
- cp gvimtutor /home/kocha/.vim/bundle/vim/bin/gvimtutor 
- chmod 755 /home/kocha/.vim/bundle/vim/bin/gvimtutor 
- make[1]: Leaving directory `/home/kocha/.vim/bundle/vim/src' 
- [neobundle/install] (49/55): |unite-build| Skipped 
- [neobundle/install] Same revision.  
- [neobundle/install] (50/55): |neosnippet| Updated 
- [neobundle/install] * 9e38cd7 [2 days ago] - Improved escape placeholder behavior.  
- [neobundle/install] * 08d5f03 [2 days ago] abandone legacy ruby syntax 
- [neobundle/install] * 4f32b4f [2 days ago] Add kp19pp snippet.  
- [neobundle/install] * f25adad [2 days ago] typofix: lambda. also follows coding convention 
- [neobundle/install] (52/55): |excitetranslate-vim| Skipped 
- [neobundle/install] Same revision.  
- [neobundle/install] (53/55): |unite-help| Skipped 
- [neobundle/install] Same revision.  
- [neobundle/install] (54/55): |neco-ghc| git pull --rebase 
- [neobundle/install] (55/55): |webapi-vim| git pull --rebase 
- [neobundle/install] (54/55): |neco-ghc| Skipped 
- [neobundle/install] Same revision.  
- [neobundle/install] (55/55): |webapi-vim| Skipped 
- [neobundle/install] Same revision.  
- [neobundle/install] Installed/Updated bundles: 
- vimshell 
- vim-unite-giti 
- syntastic 
- vim 
- neosnippet 
- [neobundle/install] Helptags: done. 4 bundles processed 

っとこんな感じでした。
もちろん、Vimは更新(7.3.877)されています。
※現在(2013/4/8 21:00時点)は 7.3.884ですね。

f:id:kocha2012:20130408210726p:plain

Vim Girl可愛い!!!

大事なことなので、もう一度。
※良い子は真似しないでね。

次回は、@thinca さんになります。

参考