2011年7月30日 星期六

(Vim) 設定 Vim 開發環境,使用 Vundle [on Windows]

0 意見
步驟1:安裝 msysgit
參考:https://github.com/gmarik/vundle/wiki/Vundle-for-Windows
記得選擇:Run git from Windows command prompt


步驟2:將 curl.cmd 放到 C:\Program Files (x86)\Git\cmd
這一步完成後,才可以使用 BundleSearch 之類的指令

步驟3:設定 Vundle

$ git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

步驟4:設定 _vimrc
參考:https://github.com/gmarik/vundle/blob/master/README.md

步驟5:放入 ctags.exe
可以放到 C:\Program Files (x86)\Vim\vim73 路徑下,
也就是 GVIM.exe 的相同目錄下

---
我的 vimrc:https://github.com/bcswlmpke/hank.vim




(Mac) 安裝 Mac Ports

0 意見
Mac Ports
http://www.macports.org/

Install MacPorts
http://www.macports.org/install.php

下載 dmg 安裝後,打開 Terminal
輸入 sudo port -v
看到 MacPorts 2.0.0 表示成功 (此我為目前安裝的版本)

(Emacs) 文字編輯器

0 意見
以往用 Vim 開發著實感受到不少好處
不過對於大專案的開發似乎在程式碼的切換與操作上較為不便
目前的開發使用 XCode 倒也還蠻適應的

廢話說了這麼多
最近看到幾個 Emacs 的網站資源,先記下來,之後有時間再來試試看。

Emacs C mode 指令速查
http://www.dev.idv.tw/mediawiki/index.php/Emacs_C_mode%E6%8C%87%E4%BB%A4%E9%80%9F%E6%9F%A5%E5%88%97%E8%A1%A8

Emacs 文字模式熱鍵對應
http://shelandy.blogspot.com/2008/01/eamcs.html

emacs wiki
http://www.emacswiki.org/

GNU Emacs on Windows
http://yehnan.blogspot.com/2010/06/gnu-emacs-on-windows.html

emacs 基本入門
http://homepage.mac.com/yenlung/WebWiki/EmacsNotes.html

emacs 快速入門
http://www.study-area.org/cyril/opentools/opentools/x42.html

2011年7月24日 星期日

(隨拍) 台北植物園

0 意見
週末去歷史博物館參觀畢卡索特展~
剛好遇到大暑這個節氣
天氣實在很熱
然後順路到植物園參觀走走~

(牛奶) 牛奶照片第二發

0 意見
上週末回嘉義~
順便拍了一些牛奶的照片
大家應該都很想念牛奶吧!

(游泳) 第七次上課記錄

0 意見
1) 自由式打水暖身

2) 自由式左手三下,右手一下,第四下也就是右手的時候換氣

3) 自由式右手三下,右手一下,第四下也就是右手的時候換氣

在做 2), 3) 的動作時,記得每一下動作完成時,身體要轉正並做延伸,再做下一個動作

手在水中向下撥的時候,不要貼大腿,而是從身體旁邊然後以手掌往上的動作向後撥

4) 仰式打水的時候,小腿打水,腳背盡量打出水面,且身體不要晃

肚子盡量挺出水面

5) 仰式換手時,一隻手(e.g. 左手)往上舉90度,此時心裡要數著腳踢水 6 下,然後右手在水平面下將水往身體中心撥,此一同時,左手為貼近頭旁邊伸直,且右手為貼著大腿,兩手同時到定位。

6) 練小蛙腳,兩手抓牆,以「腳跟」為重心,「往牆壁也就是往前」用小腿畫圓,切記不是「向下畫圓」,練習的時候,是腳做動作,不要拱背然後身體用力拉扯。

7) 兩手抓牆時,如果蛙腳做正確,試著不要抓牆,改以兩手掌貼牆,身體會向前,而不是往後。

8) 兩種練習蛙腳的方式,一個是趴在床上練習,一個是站著,然後小腿畫圓,站直;再換另一腳。

2011年7月23日 星期六

Vi Input Manager

0 意見
下載:http://www.corsofamily.net/jcorso/vi/


Vi Input Manager
by: Jason Corso
This bundle patches the Cocoa Text System to add a Vi-like command mode. After entering command-mode (typically, by hitting escape in Vi), ordinary Vi commands can be typed and the text field will be updated accordingly. Essentially, this add Vi command functionality (albeit a small subset) to any (and all) text editors that use the Cocoa text system; e.g., Safari, TeXShop, XCode, etc. Note, however, this does not work for other programs that do not use the Cocoa system.
All the text windows, will initialize in "input" mode (standard cocoa text input). You invoke the Vi-command window (exit the input mode) by hitting ` (the back-apostrophe key, this is customizable, see installation instructions) and then key in your favorite Vi commands. For example, move down a line 'j', move right 'l', delete two lines 'd2d', and so on. You enter back into "input" mode by typing the 'i'. You get the idea. Right now, you should be thinking -- "you mean the editor in XCode will behave like Vi?" Answer: Yes.

How do iOS programmers develop applications using Vim?

0 意見
原文出處:http://www.quora.com/Vim/How-do-iOS-programmers-develop-applications-using-Vim


  
How:
  1. Install macvim,
  2. Install cocoa.vim and snipMate.vim plugins by Michael Sanders.
  3. You'll still need to use xCode for a lot of things (find definition, , use Cmd-0 to toggle back to the xCode environment.
  4. get an app for dividing your screen quickly, i use left 2/3 for xcode and right 2/3 for macvim, with a 1/3 overlap in the middle on my laptop, otherwise 1/2 and 1/2 when plugged into a monitor.
  5. use : Ctl-x Ctl-o to for auto completion options
  6. if you get no match on your autoComplete on a method call using bracket syntax then try dot syntax for the correct auto complete
  7. Cmd-0 to toggle to xCode, Cmd-Shft-R to open console and Cmd-B to build to quickly do a build and see debug output
  8. Need to look up something quickly? Cmd-0 to toggle to Xcode, Cmd-Alt-Shft-? to open up xcode documentation window
  9. C-p to show local completion options (matches within currently open buffers)
  10. set macvim to open files in a new tab in same window
  11. set folding, nocompat, incsearch, virtualedit and other options in .vimrc according to your preference.

2011年7月20日 星期三

(Mac) 使用 Eclipse + TFS plugin 來做版本控制

0 意見
使用 Team Foundation Server 做版本控制的朋友,
如果在非 Windows 的環境下開發,
那麼要如何使用 TFS 版本控制的功能呢?

以 Mac OS 為例,我知道的有下面幾種方式:
1. Windows 以 Visual Studio 做版本控制,然後以 Shared Folder 的方式分享給 Mac OS 存取
2. SvnBridge 透過 SVN 做中介
3. Eclipse + TFS plugin 

目前我使用 3.,使用上覺得還蠻方便的,
對於在非 Windows 環境下開發,
且公司又是以 TFS 做版本控管的朋友應該是蠻方便的方式,
而且操作介面跟使用 Visual Studio 的選單完全一樣。

步驟:
1) 下載 eclipse-SDK-3.7-macosx-cocoa-x86_64.tar.gz
2) 下載 TFSEclipsePlugin-UpdateSiteArchive-10.1.0.zip
3) 解壓縮 Eclipse,開啟 Eclipse 主程式
4) Help -> Install New Software -> Add -> Archive 
然後選擇  TFSEclipsePlugin-UpdateSiteArchive-10.1.0.zip
在 Name 欄位任意輸入一個名稱:TFS Plugin
5) 將 Visual Studio  Team Explorer Everywhere 2010 打勾
6) 下面我有打勾的項目有
Show only the latest versions of available software
Group items by category
Show only software applicable to target environment
Contact all update sites during install to find required software
7) 按 Next 會開始安裝,接著就照步驟完成它
8) 安裝成功後會提示 restart Eclipse
9) Window -> Show View -> Other -> 選擇 Team Foundation Server -> Team Explorer
10) 按 Team Explorer 上面的+圖示,
I have read and accept the terms in the License Agreement -> Next -> 輸入 Product Key -> Next
11) 輸入 Server 位址, e.g. http://tfs.example.com:8080/tfs
12) 輸入 Username, Domain, Password
13) 然後 Next 選擇 Team Project

以上大功告成!Enjoy!






2011年7月9日 星期六

(游泳) 第六次上課記錄

0 意見
1) 穿蛙鞋,自由式打水25公尺來回

2) 穿蛙鞋,自由式換氣25公尺來回
每一下,腳多踢三下,注意身體的平衡
膝蓋與腳掌盡量貼近,減少阻力 

3) 穿蛙鞋,手交叉,仰式打水25公尺來回

4) 雙手重疊,自由式打水,45度的時候身體翻轉成仰式,換氣,再翻轉成自由式
一直重覆
順時針2次(一次轉成仰式,一次轉成自由式)
逆時針2次

5) 自由式 3 拍轉仰,左、右手兩邊都要能夠轉成仰式

6) 練蛙腳 (記得回家坐椅子練習)

7) 練蝶腰 (手往下、頭再往下、胸部內縮,然後手放鬆伸展,胸部挺出)

8) 自由式側身打水,然後一直練換氣