lionのvimでコピペできない

なんでだろうと、調べてたら
clipboard機能がoffでコンパイルされているらしい。


macvimとか入れてみたけど、アプリ立ち上がるのが嫌。
今まで通りterminal(iTerm2)からvim操作したい。


ということで、ソースからコンパイル。

how to

どの機能を有効にするかというのは、
'--with-featuresというオプションで機能セット(tiny, small, normal, big, or huge)
みたいなのを選択するみたい。
よくわからんが、最大のhugeで。


Vim's Versions and Features

# hg install
$ sudo easy_install Mercurial

# get vim
$ mkdir src
$ cd src
$ hg clone https://vim.googlecode.com/hg/ vim

# show configure options
$ cd vim/src
$ ./configure --help

# install
$ ./configure --prefix=$HOME/bin/vim --enable-multibyte --with-features=huge --enable-fontset --enable-cscope --disable-selinux --disable-gui
$ make
$ sudo make install

あとは、prefixの場所にpathを通す。



おまけ

brew message

最初brew install vimしようかと思ったら、
こんなメッセージが。

$ brew search vim                                                                                                                                               ~
macvim		   vimeo-downloader   vimpager

If you meant `vim' precisely:

Apple distributes vim with OS X, you can find it in /usr/bin.
結局どうなったか
$ uname -a                                                                                                                                                      ~
Darwin air.local 11.0.1 Darwin Kernel Version 11.0.1: Wed Jun 29 19:53:22 PDT 2011; root:xnu-1699.23.2~1/RELEASE_X86_64 x86_64

# default vim
$ vim --version                                                                                                                                                 ~
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 24 2011 23:09:22)
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent 
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
-conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs 
-dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path 
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv 
+insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent 
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape 
-mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse 
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype 
+path_extra -perl +persistent_undo +postscript +printer -profile -python 
-python3 +quickfix +reltime -rightleft -ruby +scrollbind +signs +smartindent 
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
 -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
 -xterm_clipboard -xterm_save 
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H -arch i386 -arch x86_64 -g -Os -pipe
Linking: gcc -arch i386 -arch x86_64 -o vim -lncurses



# compile installed vim
$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug  1 2011 04:39:48)
MacOS X (unix) version
Included patches: 1-266
Compiled by rochefort@air.local
Huge version without GUI.  Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent 
-clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs 
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path 
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv 
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent 
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape 
+mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse 
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg +path_extra -perl
 +persistent_undo +postscript +printer +profile -python -python3 +quickfix 
+reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime 
+statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white 
-tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands 
+vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore 
+wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard 
-xterm_save 
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/Users/rochefort/bin/vim/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -D_FORTIFY_SOURCE=1      
Linking: gcc   -L/usr/local/lib -o vim       -lm -lncurses  -liconv -framework Cocoa 


わかりにくいのでスクリプト書いて比較してみると
こんだけ差分が出ました。
(builtin_termsが++になってるのは間違いかな。)
(補足追記)

feature before after
arabic - +
builtin_terms + ++
clipboard - +
conceal - +
emacs_tags - +
farsi - +
keymap - +
langmap - +
mouse_dec - +
mouse_netterm - +
osfiletype - none
profile - +
rightleft - +

補足(2010/08/02)

コメントで指摘していただいた通り
builtin_termsの++は意味がありました。

NO_BUILTIN_TCAPS -builtin_terms none
SOME_BUILTIN_TCAPS +builtin_terms most common ones (default)
ALL_BUILTIN_TCAPS ++builtin_terms all available