enabling the cell in Databricks.

KVNARK
Honored Contributor II

Suppose if the query is long one and its commented due to some issues later I wanted to run that cell, is there any shortcut to enable the entire cell. The cell is with 800 lines of code and each line is commented with # symbol and I want to enable it. Please let me know if any shortcut or its just replacing the entire cell without # symbol.

pvignesh92
Honored Contributor

@KVNARK .​ Hi,

If I understand correctly, you want to either comment or disable comment on your entire cell using a Shortcut.

If that's the case,

  1. To do for the whole cell -> Do a Ctrl + A, then you can use Ctrl + / in Windows. It will add # to all your lines if not commented and remove the # if commented.
  2. To do for selected lines in the cell -> Select those lines, then you can use Ctrl + / in Windows. It will add # to all your lines if not commented and remove the # if commented.

Please let me know if this helps.

View solution in original post

KVNARK
Honored Contributor II

@Vigneshraja Palaniraj​ Thank you so much for the reply Vignesh. Finally I got it while doing some R&D. its the same. Thanks!