It's good to be able to wander in Safari's online shelves and pick up books that I am interested in. Though not having enough time coding, I still managed to quickly take glimpse over two Android books recently. One is 50 Android Hacks, and another one is Android Developer Tools Essential. Both are good to read and gave me some new nuance for my poor Android knowledge.
Tired of seeing autostart finder popups every time I plugged in my new hTc one into my mac. Here's a way to disable it:
1. Identify UUID:
by using "diskutil info /Volumes/HTC\ Sync\ Manager
you can get its volume UUID
2. sudo vifs
add a line as below:
UUID=YOURVOLUMEUUID none hfs rw,noauto
= = = = =
As for disabling Android File Transfer app, you just need to rename file names of the so called Agent app:
1. /Users/user_name/Library/Application Support/Google/Android File Transfer
2. /Applications/Android File Transfer.app/Contents/Resources
Being a long time vim user, this is the first time that I heard vim supports relative line numbers, by which users can jump around the editor screen even more quickly. Just type :set rnu will do the trick.
Another good plugin that can improve navigation speed is EasyMotion. It works a bit like the "f" feature in vimperator for firefox. Too bad that it's not avaible for intellij's ideavim.
Miss my One V.
Seems the IPs of Heroku are blocked, so "git push heroku" can not work normally. In order to fix this problem, add following lines to the .ssh/config file:
Oh, by the way, remember to change the user name to your own one.
Check this link
剛剛試了一下谷歌的語音輸入，覺得有些時候應該蠻實用的。所以打算幫它在Lime HD中加個快速切換的功能。在Lime HD中原本就有開啟Google語音輸入法的方式，只是我覺得有點太麻煩了。原本的方式是：
可惜的是，我不知道怎麼debug InputMethodService，所以沒有辦法短時間內看清楚在LIMEService中的長按功能，是怎麼前後串起來的。一直找不到好的interception point。
無意中卻發現了，原來Lime有針對輸入的整個面版實作swipe的key listener！！做為一個多年的Lime HD愛用者，竟然不知道有這麼一回事。看了原始碼後，它的目前對應功能是：
(Geneve.Swiss) Climbing is pleasant, but it leads you to better views.
Some shortcuts can be integrated into ideaVIM, but some are more complicated and need other tricks to make it more handy. One of the technique is to use macros. As Mac's Automator, you can ask Intellij or Android Studio to record your actions, and make it available as a keyboard shortcut.
For example, if you want to add javadoc comment to a funtion, you need to move to the first line of a certain function, and type in /**. After pressing Enter, it will generate javadoc template for that specific function. Though it's already very convenient, it still takes time if you're not quite familiar with how to move the cursor to the first line of the function.
So, to add javadoc comment from anywhere in codes, you can record a macro to move to the first line of the func, and type /** , and Enter for you. Here's the actions:
- Start recording a a macro in Edit - Macros - Start Macro Recording
- Press Down
- Press Ctrl + Up
- Press ⌘ + Left
- Write /**
- Press Enter
- Stop the macro recording in Edit - Macros - Stop Macro Recording
- Give it a cool name
And then you can add a keyboard shortcut for this macro in Keymapping in Preferences.