Keyboard shortcut to comment lines in Sublime Text 3

后端 未结 26 2661
深忆病人
深忆病人 2020-12-02 04:42

In Sublime Text 2 it was possible to comment out a line or a block of lines with Ctrl+/ and Ctrl+Shift+/. According t

26条回答
  •  感动是毒
    2020-12-02 04:47

    On my mac the shortcut is ⌘cmd + / which makes multi line comment but as single lines:

    // if ($username && $password) {
    //  echo "You are good to go";
    // } else {
    //  echo "Fields cannot be blank";
    // }
    

    OR

    ⌥ alt + ⌘cmd + / and it's result is overall comment, from beggining of the selection to the end.

    /*
    if ($username && $password) {
        echo "You are good to go";
    } else {
        echo "Fields cannot be blank";
    }
    */
    

提交回复
热议问题