Sublime Forum

Sublime Abilities

#1

Hi, I’m new to Sublime Text, previous using Notepad++. I have a few questions:

Can Sublime save code snippets to be reused ?
Can sublime do error correcting or highlighting for most languages ?
Can sublime preview jQuery / JS code in a browser ?

Thank You, whether you want to answer or point me in the direction where I can find an answer I would appreciate it.

0 Likes

#2
  1. Yes. Tools -> New Snippet
  2. It can if you install a plugin such as SublimeCodeIntel.
  3. Sublime wouldn’t be previewing code if it’s opening in a browser, but you can setup a Build System (or install a plugin) to open the file in a browser.
0 Likes

#3

@jbrooksuk: you mean SublimeLinter?

0 Likes

#4

Whoops, yes!

0 Likes

#5

When I save a code snippet, instead of saving the snippet I need to set a tag trigger ? I assume to install a plugin you install by Tools > New Plug-in ?

0 Likes

#6

You may want to read up on snippets here: http://docs.sublimetext.info/en/latest/extensibility/snippets.html. They are very powerful, but potentially complex if you aren’t used to this way of creating them.

To install plugins, you can either do it manually, or using Package Control. I highly suggest you use Package Control, which is also the best place to find plugins, I might add.

0 Likes

#7

rael thanks.
Is SublimeLinter3-master available for Sublime 2, Package Control shows it’s only available for version 3 !

[quote]SublimeLinter
by SublimeLinter Top 25 346K Installs
Interactive code linting framework for Sublime Text 3[/quote]

<snippet> <content><![CDATA[ SomethingSnippet ]]></content> <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> <tabTrigger>snippetA</tabTrigger> <!-- Optional: Set a scope to limit where the snippet will trigger --> <scope>source.javascript</scope> <description>Snippet A</description> </snippet>

Is there more to saving a snippet, the documents appear to continue on the topic and I want to know if this is the basics for saving a snippet ?

0 Likes