ãããããã家ã§ããã°ã©ã æ¸ãããç¡ããªã¼ã
ã¨ãä¼ç¤¾ã«æ¥½ãã¿ãæ±ããã®ãæ¾æ£ããç·hidesukeã§ãã
ãã¦ããåç¥ã®éãèªåã¯Macã¦ã¼ã¶ã§ãã
ãã§ãå®ã¯ããã°ã©ãã³ã°å¥½ãã§ãã(åç½
ã ãã©ãçµ±åéçºç°å¢ã使ãã®ã¯ã¡ãã£ã¨æè¿å¥½ããããªãâ¦â¦ã
Eclipseã¨ãXcodeã¨ãMacã§ä½¿ããçµ±åéçºç°å¢ã¯ããããããããã©ããªãã ããã®éçºç°å¢ã®ä½¿ãæ¹ãè¦ãã+ã»ããã¢ããããã ãã§åãç²ããããããããªãã ã便å©ãªåé¢ãã©ãã¯ããã¯ã¹ãå¤ãã¦ã便å©ãªåé¢ããã°ã©ãã³ã°ã®é¢ç½ããå¾®å¦ã«å°ãªããªã£ã¦ããæ°ããã¦å«ãªãã ããªâ¦â¦
ã¦ãªããã§ãèªåã®ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã¯ã¨ãã£ã¿+make+ã³ã³ãã¤ã©ã¨ããã®ããã¹ããªãã§ããã
#ã¾ããããã¯ããã§è¦å´ãå¤ããã©â¦â¦
ã¾ããmakeã¨ã³ã³ãã¤ã©(gccã¨ãg++ãjavacã¨ã)ã¯ãã2å¹´ããã使ã£ã¦ãªãããã©ã
ãã£ããPerlã®äººã«ãªã£ã¦ãã¾ã£ããªãâ¦â¦(æã
javascript)
ãã¦ãMacã®ã¨ãã£ã¿ã¨ããã°è³ããã¨ãã£ã¿ãã¨miãå®çªã§ãã
ã§ãããã®miãintel macã ã¨ãªãã ãèµ·åããããã¨éããããã ãï¼
mi好ããªãã ãã©ããªãã ãã¨ã£ã¦ãã¹ãã¬ã¹ãã«ã
ã ããã軽ãã¦ä½¿ããããã¨ãã£ã¿ãæ¢ãã¦ããã®ã§ããâ¦â¦
æ°ãã¤ãã¨viæ強説ãèªåã®ä¸ã§ç£å£°ããããããã§ãã
ç 究室ã®OBã®Zããããviã ï¼ vi使ãï¼ãã¨è¨ã£ã¦ããæå³ãããåããã¾ãã
ãã¼ã ãã¸ã·ã§ã³ããã»ã¨ãã©æãåããªãã®ã¯ç´ æ´ãããï¼
ã§ããMac(10.4)ã®viã¯è²ã
ã¨ç½ ãããã
ã¡ãªã¿ã«ãã¼ã¸ã§ã³ã¯6.xã§ããã
ã¾ããããããè¨å®ããªãã¨æ¥æ¬èªããã¡ãã¨è¡¨ç¤ºãããªãã#ããã¾ã§ã¯æ®éã«ã§ãã
ã§ãã便å©ã«ä½¿ããã¨ããã£ã¦ã½ã¼ã¹ã³ã¼ãã®è²è¨å®ã¨ããªãã¨ãããããã¨ããã¨ããããå¾®å¦ã«æ¨ããããªãã
ãããããã£ã¨vi(ã¨ãããå®æ
ã¯vim)ã®ãã¼ã¸ã§ã³ããµãããããããªããã ã¼ï¼
ã¦ãªããã§vim7.1ãå°å
¥ã¼ã¼ã
ãªãã ãã©ãæ®éã«ã½ã¼ã¹ã³ã¼ãè½ã¨ãã¦ãã¦ãlangããã¯è½ã¨ãã¦ãã¦./configure; make; make install;ã ã¨ã¾ãæ¥æ¬èªãã¨ãããã¼
ã ããã¼ï¼
ã¦ãªããã§ä¸çæ¸å½googleã»ã³ã»ã¤ã«æããä¹ããããããµã¤ããè¦ã¤ãã£ãï¼
http://tomonori855.sakura.ne.jp/recipe/2007/08/vim71.html
ãã®ãµã¤ãã¯ã©ãããppcã®ããã¯ã ã£ããããªã®ã§èªåã®æ¹æ³ãå
¬éã
ã¡ãªã¿ã«Macã«ã¯ããã©ã«ãã ã¨wgetãå
¥ã£ã¦ãªãã®ã§curlã使ç¨ãã¾ãã
ã¾ãããã¡ã¤ã«ã®ãã¦ã³ãã¼ãã
/usr/local/src/ã«DLãã¾ãããªããã°ä½ãã¾ãããã é¢åãªã®ã§ãæåã£ããrootã«ãªã£ã¦ããäºåæã§
sudo -s ##rootã«ãªã
$ cd /usr/local/src
$ curl -O ftp://ftp.vim.org/pub/vim/unix/vim-7.1.tar.bz2
$ curl -O ftp://ftp.vim.org/pub/vim/extra/vim-7.1-lang.tar.gz
$ curl -O ftp://ftp.vim.org/pub/vim/extra/vim-7.1-extra.tar.gz
次ã«ãã¡ã¤ã«ãå±éãã¾ããããbz2ã¯gzããå§ç¸®çããããããï¼ tarã®ãªãã·ã§ã³ã§è§£åã§ãã¾ãã
$ tar jxvf vim-7.1.tar.bz2
$ tar zxvf vim-7.1-extra.tar.gz
$ tar zxvf vim-7.1-lang.tar.gz
ã§ã¯å®éã«ã¤ã³ã¹ãã¼ã«ã§ããintel macã®å ´å㯠--with-mac-arch=ppcã¨ãããªãã·ã§ã³ã¯ä¸è¦ã§ããä½æ
--disable-darwinããªãã¨ãããªããã¯ããåããã¾ãããã大人ããå¾ãã¾ãã --prefixã§ã¯vimã®ã¤ã³ã¹ãã¼ã«å
ãæå®ãã¾ãããã¨ã§ã·ã³ããªãã¯ãªã³ã¯ãå¼µãã¾ãã
$ ./configure --enable-multibyte --with-features=big --disable-darwin --prefix=/usr/local/vim
$ make
$ sudo make install
ã¤ã³ã¹ãã¼ã«å¾ã«ã·ã³ããªãã¯ãªã³ã¯ãå¼µãã¾ãããããããªãã¦ãPATHã«/usr/local/vim/binã追å ããã¨ã(ã¼ãã¿ã¤ãã ãªw).bash_profileã«aliasã追å ããã¨ãã§OKã§ãã
$ sudo ln -s /usr/local/vim/bin/vim /usr/local/bin/vim
$ sudo ln -s /usr/local/bin/vim /usr/local/bin/view
$ sudo ln -s /usr/local/bin/vim /usr/local/bin/vimdiff
以ä¸ã§ã¤ã³ã¹ãã¼ã«å®äº
次ã¯è¨å®ã§ããã¾ãã¯ã¿ã¼ããã«ã®è¨å®ã
ã¿ã¼ããã«->ã¦ã¤ã³ãã¦è¨å®->ã¨ãã¥ã¬ã¼ã·ã§ã³
ã§ãããéASCIIæåãã¨ã¹ã±ã¼ããããã®ãã§ãã¯ãå¤ãã¾ãã
ã¿ã¼ããã«->ã¦ã¤ã³ãã¦è¨å®->ãã£ã¹ãã¬ã¤
ã§ããæ¥æ¬èªãä¸å½èªãªã©ã®ã¯ã¤ãã°ãªãã使ç¨ããããã¯ã¤ãã°ãªããï¼æ¡ã¨ã«ã¦ã³ããããã«ãã§ãã¯ãå
¥ãã¾ãã
ã¤ãã¯ãã¼ã ãã£ã¬ã¯ããªã«ãã©ãã¾ãããã
å
¥ããã¦ã®viã§.inputrcãç·¨éãã¾ãã
$cd #ãã¼ã ãã£ã¬ã¯ããªã«ç§»å
$vi .inputrc #.inputrcã®ç·¨é
set kanji-code utf-8
set convert-meta off
set meta-flag on
set output-meta on
set input-meta on
set enable-keypad on
ãã¨ã¯.vimrcã®ç·¨éã§ãã
èªåã®å ´åã¯vimã«ã¤ãã¦ãããµã³ãã«ã®vimrcã«æ¥æ¬èªã®è¨å®ãå ãã¾ããã
$cp (vimãå±éãããã£ã¬ã¯ããª)/vim71/runtime/vimrc_example.vim ~/.vimrc
$vi .vimrc
(ãã¡ã¤ã«ã®ä¸çªä¸ã«)
"- my settings --------------------------------
set enc=utf-8
set fenc=utf-8
set fencs=iso-2022-jp,euc-jp,cp932
filetype on
autocmd FileType c,cpp,perl set cindent
autocmd FileType python set tabstop=4 shiftwidth=4 expandtab
set autoindent
set shiftwidth=4
ãããªé¢¨ã«æ¸ãã¦ããã¨ã³ã¼ãã£ã³ã°ããã¨ãã«ä¾¿å©ã§ãã
ããã§ããããã«è½ã¡ã¦ãcolorschemeã使ã£ã¦å¥½ããªè²è¨å®ãã§ãã¾ãï¼ãæ¥æ¬èªãå
¥åã§ãã¾ãï¼
vimã«ã¤ãã¦ãvimrcã使ããªãã¨vimã®ä¾¿å©æ©è½ãoffã«ãªã£ã¦ããã®ã§ã注æã
è²è¨å®ã«é¢ãã¦ã¯ãã£ã±ãããã¥ã¡ã³ããããã®ã§ã°ã°ãã¾ãããã