IT

댓글 바로 가기 Android Studio

lottoking 2020. 6. 23. 07:05
반응형

댓글 바로 가기 Android Studio


Sublime Text 또는 Eclipse와 같이 코드 주석에 유용한 Android Studio 키보드 단축키를 찾고 있습니다.

cmd+ /또는 cmd+ maj+를 누르면 /아무 반응이 없습니다 ...


숫자 패드가있는 Mac

라인 설명 모두 보유 : Cmd+/

댓글 차단은 세 가지를 모두 보유합니다. Cmd+ Alt+/

라인 설명 모두 보유 : Cmd++ =

댓글 차단은 세 가지를 모두 보유합니다. Cmd+ Alt++ =


윈도우 / 리눅스 :

라인 설명 모두 보유 : Ctrl+/

댓글 차단은 세 가지를 모두 보유합니다. Ctrl+ Shift+/

주석 블록을 제거하는 동일한 방법.


아무것도 변경하지 않고 스페인어 키보드에서 키로 주석을 달 수 있습니다.

cmd + -

또는

cmd+ alt+-

이것은 영어 키보드에서 / 스페인어 키보드에서와 같은 위치에 있기 때문에 작동합니다.


키보드 오른쪽에 슬래시 (/)를 사용해야합니다.

라인 설명 :

Ctrl + /

블록 주석의 경우 :

Ctrl+ Shift+/

Android Studio에서 모든 키맵을 볼 수 있습니다. Help ➤ Default Keymap Reference


Mac 및 터키어 키보드에서 (댓글을 달거나 주석을 해제 할 수 있음)

줄 설명 : cmd+.

댓글 차단 : cmd+ alt+.


Android Studio에서 키보드 단축키 검토 및 변경

키보드 단축키는 설정 대화 상자를 통해 구성하고 검토 할 수 있으며을 통해 액세스 할 수 있습니다 File -> Settings.

이 대화 상자가 나타나면 바로 가기를 검토 및 / 또는 추가하려면 다음을 수행하십시오.

바로 가기 수정 대화 상자

  1. 왼쪽 목록에서 키맵선택하십시오 . "키맵"옵션이 있으며 원래 선택에 따라 지정된 기능에 할당 된 바로 가기는 키맵에 따라 다릅니다.

  2. 키보드 단축키를 검토 / 할당 할 기능에 해당하는 "설명"또는 텍스트를 입력하십시오. 각 일치 항목은 아래 목록에 줄 항목이 있으며 기능과 함께 바로 가기 키가 오른쪽에 표시됩니다. 예를 들어 CTRL+ ALT+ SLASHCTRL+ K, CTRL+ C모두 라인 주석 작성을위한 두 가지 할당입니다.

바로 가기를 수정하려면

  1. 키보드 단축키를 검토 / 할당 할 기능에 해당하는 결과 라인을 선택하십시오.
  2. 마우스 오른쪽 버튼을 클릭하고 원하는 추가 또는 제거 옵션을 선택하십시오.

이 시퀀스를 사용합니다 ( '선형'단축키는 아니지만 어쨌든 유용합니다).

  • alt+ calt+ b(지주 alt블록 주석에 대한)
  • alt줄 설명에 +를 c누른 다음 alt+ l(누르고 있음 alt)

(they use the android studio menu)


for German Layout (Deutsches Layout) the default is:

for line Comment: strg + Numpad(/)

for block Comment: strg+shift+Numpad(/)


An Example for a Mac OS X 10.5+ with a German layout keyboard without NumPads:

  1. Open Preferences
  2. Search for "Keymap"
  3. Expand "Main menu"
  4. Expand "Code"
  5. Delete all shortcuts (just a suggestion)
  6. Add a shortcut for a single line comment (e.g. Ctrl++)
  7. Add a shortcut for a block comment (e.g. Ctrl+alt +)
  8. This way you can be sure that those keys are not mapped (except if you assigned them before to another function)

    여기에 이미지 설명을 입력하십시오


On PC it's by default set to Ctrl + /. This will toggle commenting a selection or current line.


In Android stdio CTRL + SHIFT + /


Comment method like pro developers:

Windows/linux:

Line Comment : Ctrl + /

Block Comment : Ctrl + Shift

Method Commenting:

Type `/**` and press `Enter Key`

it will add the comment snippet like we see in standard documentation, give it a try this once.

/**
 * 
 * @param addOpacity
 */
public void setOpacityOnUserImage(boolean addOpacity) {
// Your business logic. 
}

I am working with a german keyboard and the slash (/) is on the 7 key, meaning access would be Ctrl + Shift + 7. However, this does not work as this is predefined as something with bookmark 7.

I went to settings (search for keymap) and deleted all existing shortcuts. I than added Ctrl + 7, confirmed deletion of bookmark shortcut and now can work well.


For multiline comment in android studio

select the statement that you want to commented then

use ctrl+shift+/

and for removing mutiline comment 

select the statement that you want to uncommented then

use **ctrl+shift+/**

SINGLE LINE COMMENT

For single line comment

use ctrl+/


For Line Comment: Ctrl + /

For Block Comment: Ctrl + Shift + /


Ctrl + Shift + / works well for me on Windows.


In LINUX

1.Single line commenting. Ctrl + /

2.For block comment Ctrl + Shift + /


Mac (French-Canadian Keyboard):

Line Comment hold both: Cmd + É

Block Comment hold all three: Cmd + Alt + É

"É" is on the same position as "?/" in english one.


Are you sure you are using / and not \ ? On Mac I have found by default:

  • Cmd + /

Comments using // notation

  • Cmd + Opt + /

Comments using /* */ notation


If you are used with Eclipse, there is something in Settings>Keymap Keymaps: and you can pick Eclipse to keep the same shortcuts.


on mac, using uk english keyboard layout to reach quickcomment in android studio the key combination is:

cmd + alt(option) + /


For Line Comment hold both:

Ctrl + /

For Block Comment hold all three:

Ctrl + Shift + /

Same way to remove the comment block.


In android studio you can do single comment with (go to line then Ctrl+/) and block comment with ( select text then Ctrl+Shift+/)

Also if you want to change color of commented text go to File->Settings->IDE settings->Editor->Color & fonts->Java->(Line comment or block comment) and change properties. I prefer it to be green which is used in notepad++ editor.


In the Icelandic MAC keyboard: CMD + -

참고 URL : https://stackoverflow.com/questions/25523490/comment-shortcut-android-studio

반응형