Programing

Atom에서 코드 블록 주석 처리

crosscheck 2020. 6. 15. 21:45
반응형

Atom에서 코드 블록 주석 처리


Webstorm 및 RubyMine에서 Atom으로 이동했으며 Jetbrains 편집기에서 코드 블록을 선택하고 CMD+를 누르는 기능이 누락되어 -각 행의 시작 부분에 언어 별 주석 문자를 추가합니다. ( #루비 //, js, /*CSS 등).

Atom 또는이 기능을 제공하는 패키지에 대한 바로 가기가 내장되어 있습니까?


에 따르면 , cmd+ /그것을해야한다.

Windows 및 Linux의 경우 ctrl+ /입니다.


Atom에는 특정 주석 차단 기능이 없지만 더 많은 행을 선택한 다음 일반 ctrl- /(Windows 또는 Linux) cmd- /(Mac)을 사용하면 모든 행에 주석이 표시됩니다.


Command+ /또는 Ctrl+ shift+ 7가 작동하지 않습니다 (debian + colombian keyboard). 제 경우에는 다음을 추가하여 Atom keymap.cson 파일을 변경했습니다.

'.editor':
  'ctrl-7': 'editor:toggle-line-comments'

그리고 지금 작동합니다!


또한 패키지가 있습니다 :


(Cmd + /)를 누르면 한 줄 주석이 만들어집니다. // Single line comment

/**블록 주석을 만들려면을 입력 하고 Tab 키를 누릅니다.

/** * Comment block */


위의 의견을 모두 존중하므로 패키지를 사용할 필요가 없습니다.

1) click on Atom 
1.2) then ATL => the menu bar appear 
1.3) File > Settings  => settings appear
1.4) Keybindings > Search keybinding input => fill "comment"
1.5) you will see :

원자 편집기의 키 바인딩 패널

구성을 변경하려면 키맵 파일을 매개 변수화하면됩니다.


Ctrl+ 를 사용할 수 있습니다 /. 이것은 나를 위해 작동합니다.


여러 줄 주석은 줄을 선택하고 Ctrl + /를 눌러 만들 수 있습니다. 그리고 지금 당신은 주석을위한 많은 플러그인을 가질 수 있습니다

1) 의견-https: //atom.io/packages/comment
2) 블록 주석 줄-https: //atom.io/packages/block-comment-lines

더 나은 하나는 블록 코멘트입니다 ..


keymap.cson파일을 편집 하고 추가하십시오

윈도우

'.platform-win32 .editor':
  'ctrl- /': 'editor : 토글 줄 주석'

'.platform-darwin .editor':
  'cmd- /': 'editor : 토글-줄 주석'

이제 주석을 달고 싶은 텍스트를 강조 표시하고 키 바인딩을 누르십시오.


Windows 에는 Ctrl+ Shift+ /사용할 수 있습니다 .


Atom does not have block comment by default, so I would recommend searching for atom packages by "block comment" and install the one suits to you.

I prefer https://atom.io/packages/block-comment because is has the closest keyboard shortcut to line comment and it works as i need it to, meaning it would not comment the whole line but only the selected text.

line comment: CTRL+/ block comment: CTRL+SHIFT+/ (with the plugin installed)


On an belgium keyboard asserted on the mac command + shift + / is the keystroke for commenting out a block.


CTRL+/ on windows, no need to select whole line, Just use key combination on line which you want to comment out.


first select your block of code then press cmd + / for MacOS

참고 URL : https://stackoverflow.com/questions/31364400/commenting-out-code-blocks-in-atom

반응형