The Apps Script Lab

Command Your Code

📌 Open the Command Palette with:

If you’ve been coding in Google Apps Script for a while, chances are you’ve clicked through menus or memorized toolbar icons to run functions, rename variables, or jump between files. But did you know there’s a faster, cleaner, and more efficient way to navigate the entire editor?

Say hello to the Command Palette, the productivity secret weapon borrowed from popular IDEs like VS Code, also available in the Apps Script editor. With just a simple keyboard shortcut, you unlock a searchable menu that puts hundreds of commands right at your fingertips.

🧾 Apps Script Command Palette Cheat Sheet
Google Sheet Preview – AS Command Lines

The commands I use everyday ⭐

The classics… 

Save: ctrl + S

Undo: ctrl + Z

Redo: Ctrl + Y

Add break point: Ctrl + b (check debugger article!)

Comment: Ctrl + /

Peek definition 🔍 Alt + f12

Lets you view the source code of a function, variable, or class without leaving your current file or position. Instead of jumping to the definition, it opens a little inline window (or popup) right where you are, showing you the original declaration.

Think of it like a quick “preview” of the code behind the name you’re hovering over.

Peek references🔍

Peek References shows you every place in your code where a specific function, variable, or class is used, all in a compact, inline popup, without navigating away from your current position.

Think of it like a quick “preview” of the code behind the name you’re hovering over.

Format document 🧹 (alt + shift + F

Format Document automatically cleans up and organizes your code fixing indentation, spacing, line breaks, and aligning things like brackets and equals signs to make your script easier to read.

It doesn’t change how the code runs, it just makes it look beautiful and consistent. ✨

Rename Symbol (F2 / sometimes Alt + F2 depending on system)

Rename Symbol (F2) lets you instantly rename a variable, function, or class across your entire script, way faster and safer than using Ctrl + F and replacing manually. Just place your cursor, press F2, type the new name, and it updates every reference automatically. Clean, quick, and no missed spots! 🧠✨

It doesn’t change how the code runs, it just makes it look beautiful and consistent. ✨

Format selection

Perfect for formatting HTML inside strings! 🧼

Use Format Selection when you’ve pasted a messy HTML snippet into a string — it smartly indents and cleans up the code inside, even if it’s wrapped in quotes. A handy little cheat code for keeping embedded HTML readable and elegant! 💡✨

Scroll to Top