Yelp Facebook YouTube Twitter Instagram

Noble Blog

Articles on: Coding Tips

Update Image Size in Sublime Text

Sublime Text with Emmet allows you to automatically update width and height attributes on img tags. Place the cursor inside an img tag and hit Ctrl–Shift–I (Mac) or Ctrl–U (Windows).

Coding Tips

Go To Line in Sublime Text

In Sublime Text, you can quickly jump to any line in the code. Hit Ctrl–G (Mac and Windows). Type in a line number and hit Return/Enter to go to that line.

Coding Tips

Jump to the Beginning or End of a Line

To jump to the beginning or end of the line, hold Cmd and hit Left or Right Arrow (Mac). Windows users, hit Home to jump to the beginning of the line and End to jump to the end of the line. This is an operating system feature so it should work in any text editor. 

Coding Tips

Paste From Recent History in Sublime Text

Sublime Text remembers the last 15 items you’ve copied and you can paste any one of them!

Hit Cmd–Option–V (Mac) or Ctrl–K then Ctrl–V in quick succession (Windows) to access the list of copied items. Use the arrow keys to select an item and hit Return/Enter to paste.

Paste From Recent History in Sublime Text

Coding Tips

Quickly Select One or More Lines in Sublime Text

In Sublime Text, you can select lines with a keystroke. Hit Cmd–L (Mac) or Ctrl–L (Windows) to select the current line. Repeat the keystroke to add the line below.

Coding Tips

Join Lines in Sublime Text

Sublime Text allows you to quickly join lines together. Select the lines and hit Cmd–J (Mac) or Ctrl–J (Windows).

If nothing is selected, Sublime Text will join the line below to the current line.

Join Lines in Sublime Text

Coding Tips

Sort Lines in Sublime Text

Sublime Text allows you to quickly sort lines alphabetically. Select the lines you want to sort and choose Edit > Sort Lines. You can also use the keystroke F5 (Mac) or F9 (Windows).

Sort Lines in Sublime Text

Coding Tips

Multiple Text Cursors with Arrow Keys in Sublime Text

While you can place multiple text cursors in Sublime Text with Cmd–Click (Mac) or Ctrl–Click (Windows), here's another technique that comes in handy.

Hold Ctrl–Shift (Mac) or Ctrl–Alt (Windows) and hit Up or Down Arrow to place an additional text cursor above or below the current cursor.

Multiple cursors coding tip

Coding Tips

Change Text Case in Sublime Text

Sublime text allows you to quickly convert selected text to upper case or lower case.

- To convert to upper case: In quick succession, hit Cmd–K then Cmd–U (Mac) or Ctrl–K then Ctrl–U (Windows). 
- To convert to lower case: In quick succession, hit Cmd–K then Cmd–L (Mac) or Ctrl–K then Ctrl–L (Windows).

You can also convert to title case by choosing Edit > Convert Case > Title Case (there’s no keyboard shortcut).

Convert case coding tip

Coding Tips

Increase & Decrease Numbers in Sublime Text

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

Coding Tips