how to run code in sublime text editor
Sublime Text Code Editor : If you want to customize WordPress in-depth or learn more about web design and development, code editors are your best bet. Compared to regular text editors, they can significantly simplify the process.
The issue: Choosing the ideal instrument is challenging because there are so many possibilities available. Because of this, we wanted to assist you by thoroughly evaluating some of the most well-liked code editors.
We began with Atom a few while ago. We’ll talk more about one of its rivals in this article, the well-known Sublime Text. Continue reading to learn more about one of the most popular code editors available and what sets it apart from the competition.
Sublime Text: Overview and Setup
The official website is where you can get Sublime. For OS X, Windows, and Ubuntu, version 3 is presently in beta. A portable version that can be simply run from a USB stick is also available.
Although Sublime Text can be downloaded for free, it is not actually free. After the trial period, you should obtain a license for ongoing use. The download page, however, explicitly indicates that there is no mandated time restriction for review, giving the impression that it is more of a voluntary thing. If you choose to obtain a license, the fee is $70.
After selecting the version you want, downloading is completed swiftly. Sublime is relatively compact, as was already highlighted in the Atom review. After installation, the software takes up only 22MB total, down from the installation archive’s 8MB size.
The first startup is required following installation. When you do, the following screen appears:
You can see that there is no introduction, help screen, or anything of the sort. You immediately enter the main editor interface. By selecting File > Open Folder, you can add a project to Sublime at this point. As soon as you do, the folder hierarchy is displayed on the left.
Any file you select from that opens to allow for editing on the right. Projects are another way to group files and folders together for fast access later. So far, so typical; let’s now examine some of Sublime’s unique features.
Benefits and Features
Numerous devoted fans of Sublime exist. Online, the phrase “greatest code editor ever” is frequently used. See why that is, shall we?
Code folding, syntax highlight, and autocompletion
Atom and Sublime Text look extremely similar from the overall perspective. This should come as no surprise given that many believe Atom is actually based on Sublime.
It also comes as no surprise that both offer code autocompletion and syntax highlighting for that reason. Although in reality, no modern code editor worth its salt can probably survive without.
A few dozen programming languages are natively supported by Sublime, which also color-codes items in accordance with the selected language (more on this below). You will even receive real-time parsing error warnings from the code editor!
Additionally, Sublime offers code folding and code autocompletion, which includes user-created variables. The latter compresses enormous amounts of code by obscuring portions of it.
Even though these are all quite common features, it’s comforting to know that Sublime doesn’t skimp on the fundamentals.
Customizability
Sublime Text may be completely customized with plugins, just like Atom. Users may locate, install, upgrade, and delete plugins immediately from inside the editor with the help of the rapidly integrated Package Manager, typically without having to restart the program.
Users can download packages via PackageControl.io, BitBucket, and Github. The latter is Sublime’s own repository, where the code editor’s support group posts a ton of plugins to expand its functionalities.
In total, more than 3,800 packages are offered, and they are arranged according to labels that are new, trendy, recently updated, popular, and other. With their assistance, you can transform Sublime from a basic code editor into an entire IDE and create the precise kind of work environment you require. For Sublime Text, there are several incredible packages available. View our ranking of the top 10 Sublime Text packages rather than searching the repository yourself.
The ability to sync files on a distant FTP server, examine Markdown code, and add complex sidebar controls are a few examples. Packages offer full information on their functioning, installation, and usage, including screenshots, just like the WordPress plugin directory.
The only drawback is that this data is only accessible online; it is not included in Sublime Text itself. On the other hand, installing with Package Control is incredibly quick, and you can manage all package settings under Preferences > Package Settings.
Themes are additionally offered in addon package form. The 22 pre-installed themes that Sublime comes with are in addition to this. Each of them offers customers the option to quickly modify the color palette of their code. The rest of the UI, in contrast to Atom, remains the same.
Portable, quick, and stable
When using Sublime, the program’s speed becomes immediately clear. The code editor was created using Python and C/C++, and it is incredibly compact. In fact, it opens almost instantly when selected from the Windows start menu. Atom, in comparison, takes a while to load up on the screen.
When working with large files, this distinction is also obvious. Much more demanding tasks can be completed by Sublime Text without encountering any issues. In my tests, I encountered no issues at all, and I was unable to locate any internet complaints concerning performance concerns.
In fact, one of the most frequently cited arguments in favor of choosing Sublime Text over other editors is its stability. There don’t seem to be many crashes or freezes.
Strong Search
The robust search capabilities of Sublime are yet another noteworthy aspect. Its standard search and replace feature may check for full words, regular expressions, and case-sensitive searches. Additionally, you can store search results in a buffer for later use.
The Goto function is an additional option. When you select it, Sublime displays a search bar. Any file or directory name you begin typing in your project or active folder will immediately produce a list of possibilities that fit.
The greatest part: Sublime will automatically open a highlighted file in the background as you scroll down the list so you can verify that it is the correct file. Once you’ve located it, clicking on it or pressing enter will open the file in a new tab, allowing you to get to work right away.
The command palette comes last. Anyone with memory issues can browse this list of accessible commands, utilize fuzzy search to identify what they’re looking for, and then execute it without ever taking their hands off the keyboard. Easy as pie.
Concurrent Editing
The ability to use several cursors at once is one of Sublime Editor’s most intriguing features. This effectively means that you can make the same edit simultaneously in multiple locations.
If you want to alter the name of a single variable throughout the entire file, for instance, you may select it once, have Sublime mark all other instances, and then input the new name for every single one of them at once. Even more convenient than search and replace is this.
Multiple lines of code can be reformatted simultaneously using the same capability. An effective illustration of this is the creation of an HTML ordered or unordered list. Instead of copying and pasting each list item’s li> and /li> statements, consider composing them all at once. starting to grasp the advantages?
Minimap
The minimap comes next. In the upper right corner, there is a brief file overview.
It’s quite helpful to get an idea of how big your file is and it also displays your current location as you move the scroll bar. Even better, you may navigate directly to a location on the map by clicking on it. It’s a tiny detail, but it’s very helpful, especially for bigger files.
Displays, Panels
The option to display text files in various ways is the last one.
First, you can arrange a number of files in tabs much like a browser window. You can then freely move and rearrange them in this manner. Pretty typical, but there is more.
For instance, you can create a grid to display up to four files at once.
Other layout settings in Sublime include columns and rows in addition to full-screen and distraction-free editing modes. WordPress users will fit in quite fine.
What could be done better?
Of course, Sublime has additional features in addition to those listed above. But those are the ones that stuck out the most and actually contributed to its excellence as a code editor. But let’s also consider the areas where improvements could be made.
not always welcoming to beginners
Despite how excellent and simple to use Sublime is, it is very much designed for advanced users. While that isn’t necessarily a bad thing, it occasionally makes it frightening for novices.
The settings panel is where you’ll find this most frequently. Instead of a menu when you open it, you have access to a text file that contains all the settings. Other choices can be set to true or false here, and users can also override them in a different file that is opened on the side.
Even if everything is properly described, a UI solution could have been a preferable choice in this case. This also applies to package control, which is primarily text-based. Atom does a better job at this, in my opinion. However, WordPress’ approach to handle plugin installation has spoilt me, which is why I choose Atom’s approach.
Slow Progress
Development for Sublime can be a little delayed because there isn’t a big team supporting it. Bug patches, new releases, and improvements don’t come as frequently as they do with Atom. As an illustration, the most recent version, Sublime Text 3, began its beta testing phase at the beginning of 2013. It’s still not out of it as of the end of 2016.
Some individuals are also concerned about the editor’s future as a result of this. If there are only a few developers, the project can utterly disappear if they are compelled to give it up. Because of this, some people question if Sublime is future-proof. But as of now, it doesn’t appear necessary.
In a Nutshell: Sublime Text
One of the most well-liked code editors available is Sublime, and for good reason. The application runs incredibly quickly and is mature and stable. Along with that, it includes a ton of wonderful features and charming embellishments.
In addition, Sublime Text may be anything for anyone because to its modular design and extendability. The editor is appropriate for developers from a variety of backgrounds and specialties.
While Sublime seems much more streamlined and it is obvious that the editor’s developers put a lot of effort into it, the user interface is generally similar to Atom.
It only seems like it could use a little of the WordPress/Atom methodology and possibly expand its crew by a couple. In this manner, advancement would be accelerated and Sublime’s position as a leading code editor would be strengthened. Even so, it’s unquestionably worthwhile for anyone who earns a job writing computer code.