05 4 / 2012
Sublime Text 2 OS X Command Line
Sublime Text 2 contains a command line tool, called subl, with this binary file, you can open a folder or a file with its parent folder as opening project in new window.
For example, after you run the following command:
# inside my-webapp/
subl .
# or
subl index.html .
Sublime will open a new window that contains a sidebar with folder my-webapp/.
To use subl is quite easy, create a bin/ folder under your home directory (~/), and run this command:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
But, I would say that, this way is not clean enough, coz in normal case, you won’t have a ~/bin/ folder, and this folder may not hidden by default.
So, here is my solution:
# add this into your .bashrc or .zshrc
export PATH=/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin:$PATH
Beware of that you should change the path based on your Sublime Text location.
Why do I prefer this way?
Coz .bashrc or .zshrc is hidden by default, and you would have it in most case.
And if you move Sublime Text to another directory, just change the path, not need to create symbol link again.
For further information, read official documentation.
31 3 / 2012
更改 Mac 键位的功能 — KeyRemap4MacBook
把 MBP 的光驱换成 SSD 之后,Eject 键就显得很多余了,让它就那么空着很不符合键盘党的效率需求,加之我把 F1~F12 换成了标准用途,要是能把 Eject map 成另外的键,那就方便很多,Google 后找到了这款:KeyRemap4MacBook。

如图上设置,只要按下 Eject 就相当于按下 Expose,而不是弹出光驱。
当然这款软件的功能不只这么简单,还带有 Vi/Emacs Mode、针对一些功能的设置,甚至还有为 PC 或特定语言用户的设置,相当强大。
PS:因为 Eject 键需要按下去一两秒才能触发,所以推荐安装该作者的另一款软件来解决延迟:NoEjectDelay。
16 12 / 2011
Enqueue - An elegant playlist-based music player for OS X
Enqueue uses less memory than iTunes and much more faster than iTunes.
It also supports Growl notification, and shares rating information with iTunes.
Permalink 2 notes
14 9 / 2011
让人疯掉的 MindNode
Mac 下面有一款不错的 Mind Map 工具, 叫 MindNode, 同时提供 OS X 和 iOS 版本, OS X 有免费和收费版 (Pro), 只有收费版才可以和 iOS 版本互相协作, 不过不是通过 Cloud Sync, 而是 Dropbox 等方案.
为什么要说 MindNode 会让人疯掉呢? 原因就是这个协作部分.
我购买它的原因就是因为可以在 OS X 和 iOS 之间协作, 但实际上并没有 make my life easier, 而是 make my life crazy.
OS X 中保存的格式是 .mindnode (以下简称 mn), iOS 是 .mindnodetouch (简称 mnt), 原因估计是有部分 OS X 特性 iOS 版是不能用的, 并且可以限制 Free 版导入 mnt 文件.
但是呢, OS X 是只能保存 mn, iOS 只能保存 mnt, 互相要协作的话, 就变成这样子 (以 example.mn 为例):
保存 example.mn 到 Dropbox > iOS 版打开 example.mn, 保存 example.mnt 到 Dropbox > OS X 版打开 mnt 保存为 mn > iOS … > OS X > …
- 在 OS X 里, 协作的同时必然存在着两个文件, 一个对应 OS X, 一个对应 iOS
- 在 iOS 里, 每导入一次 OS X 版的文件就会生成一个 iOS 版的文件, 意味着导入 10 次, 在列表里就会有 10 个 example 项目, 并且没有创建时间等信息, 只有文件名
这个协作流程可谓地狱啊.
Permalink 21 notes
