The recommended way to install the Sublime Text XPath plugin is via Package Control. Package Control will install the plugin on your system and keep it up to date. Ensure Package Control is installed. In Sublime Text, open the Preferences menu, and select Package Control. Exalt Exalt is a Sublime Text plugin for validating and formatting XML documents. Note: You might also want to check out LSP-lemmix. The theme in the screenshot is Boxy. Package Control. One way of installing Sublime Text plugins is by downloading files and copying. Sublime Text is a cross-platform text and source code editor, with a Python application programming interface (API). Sublime Text is proprietary software (Sublime 2 has a free version) however it is worth to pay for Sublime Text. Its functionality is extensible with plugins.
Sublime Text Edior is well known name amonsgt developers, if you are a developer you cant underestimate the power of this tool. Sublime Text is a cross-platform text and source code editor, with a Python application programming interface (API). Sublime Text is proprietary software. Its functionality is extendable with plugins. Most of the extending packages have free-software licenses and are community-built and maintained.
Though Sublime is fully enriched with plugins and features but still myriad of plugins are available which make this tool useful for almost every type of developers (newbie + professionals). In this article we have gathered a list of Best Sublime Text Plugins which are capable of doing almost everything for developers and help them to perform several hassle free tasks. If you are aware of any other useful plugins, please let us know by commenting below. Enjoy !!
1. Emmet
Emmet (formerly Zen Coding) is a web-developer's toolkit that can greatly improve your HTML & CSS workflow. With Emmet, you can type CSS-like expressions that can be dynamically parsed, and produce output depending on what you type in the abbreviation. Emmet is developed and optimised for web-developers whose workflow depends on HTML/XML and CSS, but can be used with programming languages too.
2. Package Control
Package Control is the Sublime Text package manager. It includes a list of over 2,000 packages available for install, and users can add any GitHub or BitBucket repository themselves. Once installed, packages are kept up-to-date automatically. Firefox customer support.
3. Sublime Enhancement
Sublime Linter includes lots of new features and provides enhancements to the operations on Sidebar of Files and Folders for Sublime, Provides the basics: new file/folder, edit, open/run, reveal, find in selected/parent/project, cut, copy, paste, paste in parent, rename, move, delete, refresh, allows to display 'file modified date' and 'file size' on statusbar and many more.
4. Live Reload
Live Reload is a web browser page reloading plugin for the Sublime Text 3 editor. With this plugin you don't need to refresh your browser each time you make the changes to the file.
5. Sublime Linter
This plugin prevents syntax errors The key here is it can be run in background mode, so that as soon as you do something boneheaded, you will know about it. No save required.
6. GIST
Gist lets you highlight and create GitHub Gists directly from inside sublime. And you can update them, and retrieve them! Need to send a buddy a that bit of configuration? Well just clip a Gist and shoot it over to him.
7. ApplySyntax
ApplySyntax is a plugin for Sublime Text 2 and 3 that allows you to detect and apply the syntax of files that might not otherwise be detected properly. For example, files with the .rb extension are usually Ruby files, but when they are found in a Rails project, they could be RSpec spec files, Cucumber step files, Ruby on Rails files (controllers, models, etc), or just plain Ruby files.
8. GIT
This plugins lets you run some Git commands from SublimeText such as Add and Committing Files, Viewing Log, and Annotating Files.
9. JS Minifier
Sublime Text plugin for javascript minification using Google Closure compiler .
9. DocBlockr
DocBlockr is a package for Sublime Text 2 & 3 which makes writing documentation a breeze. DocBlockr supports JavaScript, PHP, ActionScript, CoffeeScript, TypeScript, Java, Groovy, Objective C, C, C++and Rust.
10. Package Resource Viewer
PackageResourceViewer lets you view, and edit packages that come from SublimeText easily. You can also extract package, which will copy it to the User folder so you can safely edit it.
11. JSLint
JSLint4Java (http://code.google.com/p/jslint4java/) is a java wrapper around the fabulous tool by Douglas Crockford, jslint. It provides a simple interface for detecting potential problems in JavaScript code. This project provide a plugin to add JSLint support for Sublime Text 2.
12. Can I Use
With this plugin, you can check the browser support for CSS properties and HTML elements that you are using.
13. Alignment
Alignment lets you align your codes including PHP, JavaScript, and CSS, thus making it neat and more readable.
14. Clipboard History
Clipboard History plugin lets you Keep a history of your clipboard items. Let you paste them back in, as needed.
15. SublimeFileDiffs
Shows diffs between the current file, or selection(s) in the current file, and clipboard, another file, or unsaved changes. Can be configured to show diffs in an external diff tool.
See also
- API Reference
- More information on the Python API.
- Plugins Reference
- More information about plugins.
This section is intended for users with programming skills.
Sublime Text can be extended through Python plugins. Plugins build features byreusing existing commands or creating new ones. Plugins are a logical entity,rather than a physical one.
Prerequisites¶
In order to write plugins, you must be able to program in Python.At the time of this writing, Sublime Text used Python 3.
Where to Store Plugins¶
Sublime Text will look for plugins only in these places:
InstalledPackages
(only .sublime-package files)Packages
Packages//
As a consequence, any plugin nested deeper in Packages
won't be loaded.
Keeping plugins directly under Packages
is discouraged. Sublime Text sortspackages in a predefined way before loading them, so if you save plugin filesdirectly under Packages
you might get confusing results.
Your First Plugin¶
Let's write a 'Hello, World!' plugin for Sublime Text:
- Select Tools | New Plugin… in the menu.
- Save to
Packages/User/hello_world.py
.
You've just written your first plugin! Let's put it to use:
- Create a new buffer (
Ctrl+n
). - Open the Python console (
Ctrl+`
). - Type:
view.run_command('example')
and press enter.
You should see the text 'Hello, World!' in the newly created buffer.
Analyzing Your First Plugin¶
The plugin created in the previous section should look roughly like this:
Best Sublime Plugins
Both the sublime
and sublime_plugin
modules are provided bySublime Text; they are not part of the Python standard library.
As we mentioned earlier, plugins reuse or create commands. Commands are anessential building block in Sublime Text. They are simply Python classesthat can be called in similar ways from different Sublime Text facilities,like the plugin API, menu files, macros, etc.
Sublime Text Commands derive from the *Command
classes defined insublime_plugin
(more on this later).
The rest of the code in our example is concerned with particulars ofTextCommand
or with the API. We'll discuss those topics in later sections.
Before moving on, though, we'll look at how we invoked the new command: firstwe opened the Python console and then we issued a call toview.run_command()
. This is a rather inconvenient way of calling commands,but it's often useful when you're in the development phase of a plugin. Fornow, keep in mind that your commands can be accessed through key bindingsand by other means, just like other commands.
Conventions for Command Names¶
You may have noticed that our command is named ExampleCommand
, but wepassed the string example
to the API call instead. This is necessarybecause Sublime Text standardizes command names by stripping the Command
suffix and separating PhrasesLikeThis
with underscores, like so:phrases_like_this
.
New commands should follow the same naming pattern.
Sublime Text 3 Terminal Plugin
Types of Commands¶
Sublime Text Format Xml
You can create the following types of commands:
- Window commands (
sublime_plugin.WindowCommand
) - Text commands (
sublime_plugin.TextCommand
)
When writing plugins, consider your goal and choose the appropriate type ofcommands.
Shared Traits of Commands¶
All commands need to implement a .run()
method in order to work. Additionally,they can receive an arbitrarily long number of keyword parameters.
Note: Parameters to commands must be valid JSON values due to how STserializes them internally.
Window Commands¶
Window commands operate at the window level. This doesn't mean that you can'tmanipulate views from window commands, but rather that you don't need views inorder for window commands to be available. For instance, the built-in commandnew_file
is defined as a WindowCommand
so it works even when no viewis open. Requiring a view to exist in that case wouldn't make sense.
Window command instances have a .window
Isight camera fix. attribute to point to the windowinstance that created them.
The .run()
method of a window command doesn't require any positionalparameter.
Window commands are able to route text commands to their window's active view.
Text Commands¶
Text commands operate at the view level, so they require a view to existin order to be available.
Text command instances have a .view
attribute pointing to the view instancethat created them.
The .run()
method of text commands requires an edit
instance asits first positional argument.
15. SublimeFileDiffs
Shows diffs between the current file, or selection(s) in the current file, and clipboard, another file, or unsaved changes. Can be configured to show diffs in an external diff tool.
See also
- API Reference
- More information on the Python API.
- Plugins Reference
- More information about plugins.
This section is intended for users with programming skills.
Sublime Text can be extended through Python plugins. Plugins build features byreusing existing commands or creating new ones. Plugins are a logical entity,rather than a physical one.
Prerequisites¶
In order to write plugins, you must be able to program in Python.At the time of this writing, Sublime Text used Python 3.
Where to Store Plugins¶
Sublime Text will look for plugins only in these places:
InstalledPackages
(only .sublime-package files)Packages
Packages//
As a consequence, any plugin nested deeper in Packages
won't be loaded.
Keeping plugins directly under Packages
is discouraged. Sublime Text sortspackages in a predefined way before loading them, so if you save plugin filesdirectly under Packages
you might get confusing results.
Your First Plugin¶
Let's write a 'Hello, World!' plugin for Sublime Text:
- Select Tools | New Plugin… in the menu.
- Save to
Packages/User/hello_world.py
.
You've just written your first plugin! Let's put it to use:
- Create a new buffer (
Ctrl+n
). - Open the Python console (
Ctrl+`
). - Type:
view.run_command('example')
and press enter.
You should see the text 'Hello, World!' in the newly created buffer.
Analyzing Your First Plugin¶
The plugin created in the previous section should look roughly like this:
Best Sublime Plugins
Both the sublime
and sublime_plugin
modules are provided bySublime Text; they are not part of the Python standard library.
As we mentioned earlier, plugins reuse or create commands. Commands are anessential building block in Sublime Text. They are simply Python classesthat can be called in similar ways from different Sublime Text facilities,like the plugin API, menu files, macros, etc.
Sublime Text Commands derive from the *Command
classes defined insublime_plugin
(more on this later).
The rest of the code in our example is concerned with particulars ofTextCommand
or with the API. We'll discuss those topics in later sections.
Before moving on, though, we'll look at how we invoked the new command: firstwe opened the Python console and then we issued a call toview.run_command()
. This is a rather inconvenient way of calling commands,but it's often useful when you're in the development phase of a plugin. Fornow, keep in mind that your commands can be accessed through key bindingsand by other means, just like other commands.
Conventions for Command Names¶
You may have noticed that our command is named ExampleCommand
, but wepassed the string example
to the API call instead. This is necessarybecause Sublime Text standardizes command names by stripping the Command
suffix and separating PhrasesLikeThis
with underscores, like so:phrases_like_this
.
New commands should follow the same naming pattern.
Sublime Text 3 Terminal Plugin
Types of Commands¶
Sublime Text Format Xml
You can create the following types of commands:
- Window commands (
sublime_plugin.WindowCommand
) - Text commands (
sublime_plugin.TextCommand
)
When writing plugins, consider your goal and choose the appropriate type ofcommands.
Shared Traits of Commands¶
All commands need to implement a .run()
method in order to work. Additionally,they can receive an arbitrarily long number of keyword parameters.
Note: Parameters to commands must be valid JSON values due to how STserializes them internally.
Window Commands¶
Window commands operate at the window level. This doesn't mean that you can'tmanipulate views from window commands, but rather that you don't need views inorder for window commands to be available. For instance, the built-in commandnew_file
is defined as a WindowCommand
so it works even when no viewis open. Requiring a view to exist in that case wouldn't make sense.
Window command instances have a .window
Isight camera fix. attribute to point to the windowinstance that created them.
The .run()
method of a window command doesn't require any positionalparameter.
Window commands are able to route text commands to their window's active view.
Text Commands¶
Text commands operate at the view level, so they require a view to existin order to be available.
Text command instances have a .view
attribute pointing to the view instancethat created them.
The .run()
method of text commands requires an edit
instance asits first positional argument.
Text Commands and the edit
Object¶
The edit object groups modifications to the view so that undo and macros worksensibly.
Note: Contrary to older versions, Sublime Text 3 doesn't allow programmaticcontrol over edit objects. The API is in charge of managing their life cycle.Plugin creators must ensure that all modifying operations occur inside the.run
method of new text commands. To call existing commands, you can useview.run_command(,)
or similar API calls.
Responding to Events¶
Snes rom player. Any command deriving from EventListener
will be able to respond to events.
Another Plugin Example: Feeding the Completions List¶
Let's create a plugin that fetches data from Google's Autocomplete service andthen feeds it to the Sublime Text completions list. Please note that, as ideasfor plugins go, this a very bad one.
Note
Make sure you don't keep this plugin around after trying it or it willinterfere with the autocompletion system.
See also
EventListener.on_query_completions()
- Documentation on the API event used in this example.
Learning the API¶
The API reference is documented at www.sublimetext.com/docs/3/api_reference.html
To get acquainted with the Sublime Text API and the available commands,it may be helpful to read existing code and learn from it.
In particular, the Packages/Default
contains many examples ofundocumented commands and API calls. Note that you will first have to extractits contents to a folder if you want to take a look at the code within - PackageResourceViewer helps with this.