Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,187 members, 7,822,007 topics. Date: Thursday, 09 May 2024 at 01:07 AM

Some Things Beginners Might Not Know About Sublime Text - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Some Things Beginners Might Not Know About Sublime Text (718 Views)

Per Project Sublime Text Settings / Sublime Text Editor. / For Beginners: Learn How To Create A Simple Android Native App (2) (3) (4)

(1) (Reply)

Some Things Beginners Might Not Know About Sublime Text by naijatechworld: 6:15pm On Nov 06, 2014
I’m a big fan of Sublime Text. As with many Mac programmers, I started on TextMate and then migrated over once Sublime Text 2 was released. When I started, however, there were a lot of things that I didn’t know about ST, so I’ve compiled a list of basic things that are excellent time savers.

Multiple cursors: You can edit multiple lines of code simultaneously very easily by holding down Cmd (ctrl for Windows) and then clicking different lines with your mouse.
Reopening closed tabs: Just as with Chrome, if you accidentally close a file that you’d like to reopen, just press Shift +Cmd + T (or Shift + ctrl + T on Windows). If you keep pressing that key combo, ST will continue opening tabs in the order that you closed them.
Quick file opening: This is perhaps my favorite ST feature. Hold down Cmd + T (or ctrl + T on Windows) to open a textfield that lets you search for files within a project to open. You’ll rarely ever have to use the file tree again.
Jumping to symbols: To quickly jump to specific symbols, hold down Cmd + P (or ctrl + P on Windows) to open up a search field. Type in your symbol and press enter.
Search entire project files: To search the contents of an entire ST project, hold down Shift + Cmd + F (Shift + ctrl + F on Windows).
Jumping between words/lines: This is more of an operating system feature, but I discovered it while using ST. On Macs, if you hold down Alt while using the arrow keys, you jump between words rather than characters. Similarly, if you hold down Cmd while using arrow keys, you jump from the opposite end of a line. Very useful for quickly navigating code without your mouse.
Quickly change settings: Shift + Cmd + P (Shift + ctrl + P on Windows) opens a quick search to allow you to modify Sublime Text preferences.
The following have been additions I’ve seen in the Hacker News comments:

Jumping between word segments: ”If you hold down control, you move by word segment - this is camel-case (and underscore) aware. So, if I am at the front of the word “cakeParty”, I can move to between ‘e’ and ‘P’ by holding control and pressing the right arrow key.” (Thanks hebejebelus)
Move current line up/down: “You can also move the curent line up and down the page using Ctrl + Cmd + Up/Down” (Thanks draftable)
Sublime Package Control: “Useful for installing things like themes, syntax awareness, code linters, etc…” (Thanks po)
Quick word editing: “Cmd + d selects the current word. Subsequent Cmd + d presses will select the following instance of the word for editing. Makes it easy to do things such as renaming a local variable or changing both the opening and closing element of a HTML tag.” (Thanks haasted)
Fine-grained find+replace/modify: “Another one i’ve found useful is CMD+D / CMD+K+D. CMD+D finds the next instance of the current selection and creates another cursor there (and selects it as well). CMD+K+D skips the current selection and finds the next one.” (Thanks toran1302)
Select all instances: You can select all instances using cmd + ctrl + G (Thanks gryghostvisuals)
Go to a specific line: You can jump to a line by using Ctrl + G and typing in the line # (thanks arkinex)
Duplicate current line: “Ctrl/Cmd+Shift+D duplicates line/selected text” (Thanks akinex)

Original Post - http://blog.alainmeier.com/post/27255145114/some-things-beginners-might-not-know-about-sublime-text

(1) (Reply)

The Best Ways (as A Programmer) For Avoiding A 100% Sedentary Life / 6 Most Common Password Cracking Methods And Their Countermeasures / Timtech4u.tk

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.