Skip to main content
Noble Desktop/1 min read

Increase & Decrease Numbers in Sublime Text

Increment/Decrement Shortcut

Place Cursor on a Number

No selection needed — Sublime detects the number under the cursor.

Increment

Ctrl-Up (Mac) or Alt-Up (Windows) — adds 1 to the number.

Decrement

Ctrl-Down (Mac) or Alt-Down (Windows) — subtracts 1.

Tweak Padding/Sizes

Perfect for quickly trying CSS values — bump padding from 16px to 24px without retyping.

Master Web Development at Noble Desktop

Noble Desktop's Full-Stack Web Development Certificate covers HTML, CSS, JavaScript, and the modern web stack.

Sublime Text with Emmet allows you to quickly adjust numbers in your code.

For example, you want to change 20px to 22px. Instead of selecting and typing the new number, click on the number and hit Ctrl–Up Arrow (Mac and Windows) to increase it 1px at a time. Increments of 0.1 and 10 also work:

Increase/Decrease by 0.1: Hold Option (Mac) or Alt (Windows) and hit Up or Down Arrow 
Increase/Decrease by 1: Hold Ctrl (Mac or Windows) and hit Up or Down Arrow 
Increase/Decrease by 10: Hold Cmd–Option (Mac) or Shift–Alt (Windows) and hit Up or Down Arrow

Gif of selecting text that is inside an h1 tag and Cmd-Shift-A

Learn more Sublime Text Coding Tips. These coding tips are covered in our hands-on coding classes and bootcamps in NYC.