2015年1月30日 星期五

Android Studio -- 快捷鍵


動作
Android Studio
eclipse

  

 取代
 Ctrl+Shift+R
 Ctrl+F
 自動排版(auto formatting)
 Ctrl+Alt+L
 Ctrl+Shift+F
 註解(comment)
 Ctrl+/
 Ctrl+Shift+C








































































column selection mode -- Android Studio



[C#]
alt+shift+arrow


[Notepad++]
alt+shift+arrow


[Android Studio]
Edit->column selection mode->開啟/關閉
alt+shift+Insert->開啟/關閉




以上都可以用 alt+滑鼠拖曳選取






Android Studio Logcat 顏色


File->setting->Editor->Color & Fonts->Android Logcat

1. 取消勾選 Inherit Attributes From:........
2. 修改顏色


[參考]
Colored logcat in android studio by colorpid - Stack Overflow

自動加入import -- Android Studio ctrl shit o

[eclipse]
ctrl+shift+O



[Android Studio]
(N/A)

替代方案: 自動加入import
1. File -> Settings -> Editor -> Auto Import -> Java
2. 設定成::
Insert import on paste: All
3個選項全勾




[參考]
ide - What is the shortcut to Auto import all in Android Studio? - Stack Overflow

自訂程式碼區塊 android studio region、eclipse region like C#

[C#]
#region 標題
some_code();
#endregion



[eclipse]
(N/A)

下載外掛: eclipse-folding-plugin.tar.gz
    ref: http://kosiara87.blogspot.tw/2011/12/how-to-install-coffee-bytes-plugin-in.html
    (可疑!?、停止更新?)

使用方法: 第一個答案
    ref: http://stackoverflow.com/questions/6940199/how-to-use-coffee-bytes-code-folding
    (重啟才有效果)

個人習慣(C# style、並相容於Android Studio)
   {{ 改 region
    }} 改 endregion
   (終於...能用就好,{{ ... }}比較不會跳出奇怪的錯)



[Android Studio]
//region 標題
some_code();
//endregion

快捷鍵: 滑鼠圈選程式碼->ctrl+alt+T->C.region...endregion Comment




Android Studio 黑色背景主題、字型、大小、行距

[黑色背景主題Darcula]
1. File->Settings->Editor->Colors & Fonts-> 
2. 設定成:: Scheme name: Darcula


[自訂字型、大小、行距]
1. File->Settings->Editor->Colors & Fonts-> 選好主題
2. Save As... 另存主題
3. File->Settings->Editor->Colors & Fonts->(展開下拉)->Font
4. 設定成::
Primary font: Source Code Pro
Size: 16
Line spacing: 1.1


[使用Ctrl+滑鼠滾輪縮放IDE字體大小]
1.  File->Settings->Editor->
2. 設定成:: 
打勾 Change font size (Zoom) with Ctrl+Mouse Wheel