Create Fake “Install OS X Mountain" for use with Unibeast from InstallESD.dmg

Unibeast needs Install Mac OS X Mountain inside the /Applications folder.

But what if I only have InstallESD.dmg ?

Below is what I did. In, do:

$ cd /Applications
$ mkdir -p "Install OS X Mountain"
$ cp InstallESD.dmg "/Applications/Install OS X Mountain"

Then open Unibeast, it should pick up InstallESD.dmg.

When Unibeast installs to my flash drive, The estimated time goes up to whopping 7hrs. I opened Disk to see the used space of the flash drive, it was increasing. So I ignored the estimated time. At last the installation time did end up in about 5 minutes.

vim-css-color 很慢

裝了 vim-css-color 這個外掛之後就發現 vim 啓動變得很慢,大約需要 1~3 秒,但是只有在開 .css 檔案的時候纔會發生。

讀了 但是我的 --startuptime 參數不能用,就用接下來他提供的方法來測量啓動時間:

vim --cmd 'profile start profile.log' \
--cmd 'profile func *' \
--cmd 'profile file *' \
-c 'profdel func *' \
-c 'profdel file *' \
-c 'qa!' <filename>

我在 profile.log 當中找到這麼一段:

FUNCTION 60_pow()
Called 227970 times
Total time: 1.652021
Self time: 1.652021
count total (s) self (s)
227970 0.342732 let x = a:x
227970 0.588432 for i in range(a:n-1)
227970 0.315352 let x = x*a:x
227970 0.170424 return x


把 source code 一小段丟去 google 搜尋,果然就是 vim-css-color 的 code ,幸運的是,看起來已經有人有 patch (還有一個 pull request ),可是這個 pull request 最終沒有被 merge 回原作者的版本 (skammer)

試着想要換成 ap 的版本 但是卻又遇到了一點問題……