日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Sublime Text 2 中怎样查找scope的名称

發布時間:2025/7/14 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Sublime Text 2 中怎样查找scope的名称 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在Sublime Text 2中新增一個snippet時需要在配置文件中輸入scope節點的值來限制snippet使用的語法范圍(作用域),這個scope的值可以通過以下方法獲得:
  • 進入包所在目錄,如果不知道目錄位置,可以在編輯器內選“Preferences”-->“Browse Packages”菜單,在彈出的對話框里就能看到包所在路徑:
  • 進入對應的包內找到擴展名為“tmLanguage”的文件,打開它,從文件內查找“scopeName”這個串,找到后,緊跟其后的“string”節點內的值就是此語言對應的scope名稱。
  • 比如現在要找JSP語言對應的scope名稱,那么進入包所在目錄后再進入“Java”目錄,這個目錄里可以找到名為“Java Server Pages (JSP).tmLanguage”的文件,打開它查找“scopeName”這個串,你會看到以下內容: 那么由此可知“text.html.jsp”就是scope的名稱了。 以下是部分scope名稱列表:

    語言(語法)

    Scope名稱

    ActionScript

    source.actionscript.2

    ActionScript 3

    source.actionscript.3

    Ant

    text.xml.ant

    AppleScript

    source.applescript

    ASP

    source.asp

    Batch File

    source.dosbatch

    Bibtex

    text.bibtex

    C

    source.c

    C#

    source.cs

    C++

    source.c++

    camlp4

    source.camlp4.ocaml

    Clojure

    source.clojure

    CoffeeScript

    source.coffee

    CSS

    source.css

    D

    source.d

    Diff

    source.diff

    DOT

    source.dot

    Emmet

    source.zen.5a454e6772616d6d6172

    Erlang

    source.erlang

    Go

    source.go

    Groovy

    source.groovy

    Haskell

    source.haskell

    Hex

    source.hex

    HTML

    text.html.basic

    HTML (ASP)

    text.html.asp

    HTML (Erlang)

    text.html.erlang.yaws

    HTML (Rails)

    text.html.ruby

    HTML (Tcl)

    text.html.tcl

    HTML5

    text.html.basic

    Java

    source.java

    Java Server Pages (JSP)

    text.html.jsp

    JavaDoc

    text.html.javadoc

    JavaProperties

    source.java-props

    JavaScript

    source.js

    JavaScript (Rails)

    source.js.rails

    jQuery (JavaScript)

    source.js.jquery

    JSON

    source.json

    LaTeX

    text.tex.latex

    LaTeX Beamer

    text.tex.latex.beamer

    LaTeX Log

    text.log.latex

    LaTeX Memoir

    text.tex.latex.memoir

    Lisp

    source.lisp

    Literate Haskell

    text.tex.latex.haskell

    Lua

    source.lua

    Makefile

    source.makefile

    Markdown

    text.html.markdown

    Matlab

    source.matlab

    MultiMarkdown

    text.html.markdown.multimarkdown

    MXML

    text.xml.mxml

    NAnt Build File

    source.nant-build

    Objective-C

    source.objc

    Objective-C++

    source.objc++

    OCaml

    source.ocaml

    OCamllex

    source.ocamllex

    OCamlyacc

    source.ocamlyacc

    Perl

    source.perl

    PHP

    source.php

    Plain text

    text.plain

    Python

    source.python

    R

    source.r

    R Console

    source.r-console

    Rd (R Documentation)

    text.tex.latex.rd

    RegExp

    source.regexp

    Regular Expressions (Python)

    source.regexp.python

    reStructuredText

    text.restructuredtext

    Ruby

    source.ruby

    Ruby Haml

    text.haml

    Ruby on Rails

    source.ruby.rails

    Scala

    source.scala

    SFTP Output Panel

    output.sftp

    Shell Script (Bash)

    source.shell

    SQL

    source.sql

    SQL (Rails)

    source.sql.ruby

    Tasks

    text.todo

    Tcl

    source.tcl

    TeX

    text.tex

    TeX Math

    text.tex.math

    Textile

    text.html.textile

    XML

    text.xml

    XSL

    text.xml.xsl

    YAML

    source.yaml

    轉載于:https://www.cnblogs.com/Skyxj/p/3307838.html

    總結

    以上是生活随笔為你收集整理的Sublime Text 2 中怎样查找scope的名称的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。