Comment out a block of code for AZERTY keyboard (or any non-English keyboard layout)

A lot of customers of Looker that use non-English keyboards (such as AZERTY) are unable to use keyboard shortcuts meant for non English keyboards.


One of the critical issues that such customers face is the inability to comment / uncomment their code. 


Currently keyboard shortcuts only work on English international keyboard layout, while users may have opted for a different keyboard layout. Example: if I have a block of code more than 5 lines, and I want to comment out this out for testing, currently I need to insert # at the start of every line because I have a Mac German keyboard layout so cmd/ doesn’t work. Then the same amount of time spent removing # for uncommenting.

-- https://portal.feedback.us.pendo.io/app/#/case/70971?currentProductId=53ee6715-9dcb-471f-bd41-7846ac... 

There are a couple of workarounds that we can use here.

If customers have a Numpad - we can use ⌘ + / or Ctrl + / (division key on Numpad)

Commenting in Looker is basically adding ‘#’ to the beginning of the line. We can perform this by using another workaround as mentioned below that uses the following workarounds

  1. Add text to each line 
  2. Remove first N characters of each line (To uncomment)


Commenting the code

Step 1. We would need to put all the code that we want to comment in the original text box.

44a8147f-5506-4e4e-b764-cb650148c457.png

Step 2: Check “Add text at the beginning of the lines” box and put “#” in the textbox

5f125bd0-f03d-4428-a65c-2a0f5114fa34.png


Step 3: Copy the text from the New Text box back to LookML

5897a0a1-6eb7-40ac-b079-c8397516b94e.png

Uncommenting the code

Copy the LookML code that you want to uncomment and paste it in the text box on freetexttools.com/remove-first-n-characters-each-line/

1fecde05-6e4a-4851-a3c8-df716e0d4680.png

Put 1 (or as many # as you have in the beginning) to get rid of the # and uncomment the code

6dba6401-8566-4414-9ac1-bcaf00db8814.png
0 0 1,140
0 REPLIES 0
Top Labels in this Space
Top Solution Authors