Command Palette Search Sublime Text Essentials
In this lesson Command Palette Search Sublime Text Essentials we are gonna show what is the ability and the power of command palette in Sublime Text. It will always makes complicated works so easy as much as possible.
Lets see how the command palette is working and easy the difficult operations. We have already seen some basics about the command Palette in our previous lessons.
But here in this Command Palette Search Sublime Text Essentials we are gonna learn some depth options done by the Command Palette.
Where most of the options we tried in the command palette are available in the menu system also. But we use the command palette for make the work as soon as possible with exact result.
GOTO ANYTHING – Command Palette Search Sublime Text Essentials
Goto Anything is a very important tool to have at your disposal. It works by bringing up a palette that allows you to move towards any file, line or symbol within Our current projects or open files. As we type, Sublime gives you a live preview to help narrow down your search.
To bring up the Goto Anything palette, press Ctrl + P . There are also a few more specific shortcuts in the paragraphs below. You can always close the search by pressing ESC or the open keystrokes again.
FILES – GOTO ANYTHING
In Command Palette Search Sublime Text Essentials when we press Ctrl + P we will be shown up with a list of files, folders or projects we have currently have open. The most recently used files will be at the top of this list. From there we can start to narrow down our search by typing the name of the file, folder or project we’re looking for.
We’ll also notice that Sublime Text also provides a quick preview of files found using this search. Clicking or hitting enter on a file in the list of results will open it for us.
Using this shortcut is much quicker then clicking around our sidebar and rooting
for the file we want. If we know we are looking for file named style.css, we don’t need to spend time search down folders, when we can simply pop open Goto and start typing.
When we have multiple matches for the same file name, no worries; Sublime helps us out by showing each file’s path directly below its name.
LINE NUMBERS – GOTO ANYTHING
In Command Palette Search Sublime Text Essentials Goto Anything also allows us to jump to a specific line number within a file. When we bring up the palette, start our query with : followed by the line number we wish to go to.
Example: If We’re working on a file that gives me an error on line 235, We just need to type :235 into the Goto Anything palette. Better yet, hitting Ctrl + G will both bring up the Goto Anything palette and pre-populate it with : .
In Command Palette Search Sublime Text Essentials, if we’ve never heard of a fuzzy search before, we can think of it is a way of searching through documents for an approximate string of text rather than an exact match. I’ll leave the complex, algorithmic interpretation out for now; just know that you don’t need to type an entire word or phrase to find a match.
To do a fuzzy search, it’s the same idea as with line numbers. The only difference is that you use the pound symbol # instead of the colon : .
Developers often use this technique to do a quick search of their files to get to a certain line or section of code. It is an easier way to quickly scan a document for symbols or key combinations.
Note: Fuzzy search also works in the command palette for command names. A good example of this would be to quickly change the syntax highlighting of an open document. To do this, hit Ctrl + Shift + P and then type ssjs . You can see that the fuzzy search finds and highlights all the commands with the letters ssjs in them. You can read more about this in the command palette section.
And explore something more than this option with various searching criteria like the follow,
We can learn a lot about the Command Palette Search Sublime Text Essentials and the remaining options will be in the next upcoming lessons. We hope this lesson will gives some optional knowledge about the Sublime Text.