Selective word highlight in SublimeText
Here are some useful key combos for selecting words in Sublime Text.
Ctrl⌘G - selects all occurrences of the current word (AltF3 on Windows/Linux)
⌘D - selects the next instance of the current word if it is already selected, otherwise selects the current word (CtrlD)
- ⌘K,⌘D - skips the current instance and goes on to select the next one (CtrlK,CtrlD)
- ⌘U - "soft undo", moves back to the previous selection (CtrlU)
⌘E, ⌘H - uses the current selection as the "Find" field in Find and Replace (CtrlE,CtrlH)
If you start with an empty selection, ⌘D and Ctrl⌘G will search by whole words automatically. If you start with a non-empty selection, it will search for any instance of the text (disregarding word boundaries).
Related videos on Youtube
angeldev
Generally, less code is easier to understand than more code; however, there is a point at which code is so dense that it becomes hard to read. Code is read much more often than it is written. Code frequently lives longer than we want it to. The person who tests or maintains a piece of code is frequently not the original author. At scale, the skill level of developers reading/writing/maintaining/testing code is going to be a normal distribution around the mean of "not expert." Nick Snyder
Updated on September 18, 2022Comments
-
angeldev over 1 year
Is there any way that i can select some words to be highlighted and their instances as well. This feature i especially used when viewing log files in Notepad++
-
slhck over 10 yearsWhen you select a word, its occurrences are already highlighted. Or do you mean "select" them?
-
angeldev over 10 yearsI just want to highlight them then move on with the cursor. Used to assist in viewing logs. Selection is sepearate
-
vjalle about 7 yearsHow do you mean "move on with the cursor"?
-
-
angeldev over 10 yearsI just want to highlight them then move on with the cursor. Used to assist in viewing logs. Selection is separate
-
Jim Raynor about 8 yearsAgree. I don't need to select them all. Just want to double click to select a word then all occurrences are highlighted to help quickly examining the document. How hard is that? After 2 years seems that this one is still not fully implemented.
-
vjalle about 7 years@JimRaynor You can do that if "Highlight matches" is turned off in search. (Came here hoping to find a way to have both highlight at the same time. Looks like this might do it.)