Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CSS: source.css
D: source.d
Diff: source.diff
Erlang: source.erlang
Go: source.go
Groovy: source.groovy
Haskell: source.haskell
HTML: text.html(.basic)
JSP: text.html.jsp
Java Properties:
Java Doc: text.html.javadoc
JSON: source.json
Javascript: source.js
BibTex: source.bibtex
Latex Log: text.log.latex
Latex Memoir: text.tex.latex.memoir
Latex: text.tex.latex
LESS: source.css.less
TeX: text.tex
Lisp: source.lisp
Lua: source.lua
MakeFile: source.makefile
Markdown: text.html.markdown
Multi Markdown: text.html.markdown.multimarkdown
Matlab: source.matlab
Objective-C: source.objc
Objective-C++: source.objc++
OCaml campl4: source.camlp4.ocaml
OCaml: source.ocaml
OCamllex: source.ocamllex
Perl: source.perl
PHP: source.php
Regular Expression(python): source.regexp.python
Python: source.python
R Console: source.r-console
R: source.r
Ruby on Rails: source.ruby.rails
Ruby HAML: text.haml
SQL(Ruby): source.sql.ruby
Regular Expression: source.regexp
RestructuredText: text.restructuredtext
Ruby: source.ruby
SASS: source.sass
Scala: source.scala
Shell Script:
SQL: source.sql
Stylus: source.stylus
TCL: source.tcl
HTML(TCL): text.html.tcl
Plain text: text.plain
Textile: text.html.textile
XML: text.xml
XSL: text.xml.xsl
YAML: source.yaml
Copy link

coderblower commented Sep 13, 2017

If you don't give any scope, Then it will run globally means everywhere you can use particular snippets.

Copy link

faridcher commented Sep 22, 2017

Copy link

jeffreysbrother commented Dec 29, 2017

Yes. As mentioned above, source.css.less doesn't work. Must be source.less.

Copy link

microrony commented Jul 18, 2018

Thank you so much...

Copy link

moshiurshimul commented May 22, 2019

Thanks for all the scopes.

Copy link

raineorshine commented Jan 29, 2020

Inline React (i.e. via Babel):


Copy link

wout commented Feb 2, 2020

For Crystal apps:


Copy link

Krim-dev commented Feb 25, 2021

This is so cool

I am not sure why Cplusplus is c++ instead of c++ but ok

Copy link

bokunodev commented Sep 23, 2021

for arduino .ino files

Copy link

lpdmm0416 commented May 18, 2022

Hi is the scope for SAS (instead of SASS): (instead of sass?). Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment