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

  • 5 January 2022
  • 0 replies
  • 7 views

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-7846ac4d9e41 

 

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.

 

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


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

 

 

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/

 

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

 


0 replies

Be the first to reply!

Reply