Skip to content
erinata edited this page May 4, 2012 · 23 revisions

Scope

You can define where a snippet is available by setting the "Scope" of a snippet.

To set the scope of a snippet when you create a snippet, fill in the Scope part with the scope you like. For example, if you fill in

Lang:RUBY 

to the scope part, the snippet will be available only in Ruby files. Alternatively, you can fill in

Ext:cpp

then the snippet will be available only in files will extension cpp.

The default scope in the editor is GLOBAL, which means the snippet is available everywhere.

For existing snippets, bring up the snippet editor to change the Scope.

Here is a list of acceptable Scope formats.

Global Scope

(A snippet with Global Scope is available everywhere)

GLOBAL

Extension Scope

(A snippet with Extension Scope is available for files with particular extension. Multiple extension name supported. So snippet with Scope "Ext:html" will be available in file with extension .html or .html.erb)

Ext:extension  (For example: Ext:cpp)

Language Scope

(A snippet with Language Scope is available when notepad++ recognized the file as that particular language)

Lang:LANGUAGE (For example: Lang:RUBY)

List of Supoorted Language Scope

Lang:TXT Lang:PHP Lang:C Lang:CPP Lang:CS Lang:OBJC Lang:JAVA Lang:RC
Lang:HTML Lang:XML Lang:MAKEFILE Lang:PASCAL Lang:BATCH Lang:INI Lang:NFO Lang:ASP
Lang:SQL Lang:VB Lang:JS Lang:CSS Lang:PERL Lang:PYTHON Lang:LUA Lang:TEX
Lang:FORTRAN Lang:BASH Lang:FLASH Lang:NSIS Lang:TCL Lang:LISP Lang:SCHEME Lang:ASM
Lang:DIFF Lang:PROPS Lang:PS Lang:RUBY Lang:SMALLTALK Lang:VHDL Lang:KIX Lang:AU3
Lang:CAML Lang:ADA Lang:VERILOG Lang:MATLAB Lang:HASKELL Lang:INNO Lang:CMAKE Lang:YAML
Lang:COBOL Lang:GUI4CLI Lang:D Lang:POWERSHELL Lang:R

Name Scope

(A snippet with Name Scope is available for files with a particular filename)

Name:Filename (For example: Lang:Makefile)

System Scope

(Reserved Scope. You should not change the content of a snippet with System Scope unless you know exactly what you are doing. And you should avoid using this scope for your own snippets)

SYSTEM

Back to Main Page