diff --git a/.gitignore b/.gitignore index c0ab5df0..4b360dba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /Gemfile.lock .bundle/ +.idea benchmark/ lib/linguist/samples.json /grammars diff --git a/.gitmodules b/.gitmodules index ea5847d7..42fb8225 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,7 @@ url = https://github.com/Drako/SublimeBrainfuck [submodule "vendor/grammars/awk-sublime"] path = vendor/grammars/awk-sublime - url = https://github.com/JohnNilsson/awk-sublime + url = https://github.com/github-linguist/awk-sublime [submodule "vendor/grammars/Sublime-SQF-Language"] path = vendor/grammars/Sublime-SQF-Language url = https://github.com/JonBons/Sublime-SQF-Language @@ -22,15 +22,15 @@ [submodule "vendor/grammars/Sublime-REBOL"] path = vendor/grammars/Sublime-REBOL url = https://github.com/Oldes/Sublime-REBOL -[submodule "vendor/grammars/Sublime-VimL"] - path = vendor/grammars/Sublime-VimL - url = https://github.com/SalGnt/Sublime-VimL +[submodule "vendor/grammars/language-viml"] + path = vendor/grammars/language-viml + url = https://github.com/Alhadis/language-viml [submodule "vendor/grammars/ColdFusion"] path = vendor/grammars/ColdFusion url = https://github.com/SublimeText/ColdFusion [submodule "vendor/grammars/NSIS"] path = vendor/grammars/NSIS - url = https://github.com/SublimeText/NSIS + url = https://github.com/github-linguist/NSIS [submodule "vendor/grammars/NimLime"] path = vendor/grammars/NimLime url = https://github.com/Varriount/NimLime @@ -202,9 +202,6 @@ [submodule "vendor/grammars/sublime-robot-plugin"] path = vendor/grammars/sublime-robot-plugin url = https://github.com/shellderp/sublime-robot-plugin -[submodule "vendor/grammars/actionscript3-tmbundle"] - path = vendor/grammars/actionscript3-tmbundle - url = https://github.com/honzabrecka/actionscript3-tmbundle [submodule "vendor/grammars/Sublime-QML"] path = vendor/grammars/Sublime-QML url = https://github.com/skozlovf/Sublime-QML @@ -412,9 +409,9 @@ [submodule "vendor/grammars/oz-tmbundle"] path = vendor/grammars/oz-tmbundle url = https://github.com/eregon/oz-tmbundle -[submodule "vendor/grammars/ebundles"] - path = vendor/grammars/ebundles - url = https://github.com/ericzou/ebundles +[submodule "vendor/grammars/language-batchfile"] + path = vendor/grammars/language-batchfile + url = https://github.com/mmims/language-batchfile [submodule "vendor/grammars/sublime-mask"] path = vendor/grammars/sublime-mask url = https://github.com/tenbits/sublime-mask @@ -559,7 +556,7 @@ url = https://github.com/ShaneWilton/sublime-smali [submodule "vendor/grammars/language-jsoniq"] path = vendor/grammars/language-jsoniq - url = http://github.com/wcandillon/language-jsoniq + url = https://github.com/wcandillon/language-jsoniq [submodule "vendor/grammars/atom-fsharp"] path = vendor/grammars/atom-fsharp url = https://github.com/fsprojects/atom-fsharp @@ -602,9 +599,6 @@ [submodule "vendor/grammars/X10"] path = vendor/grammars/X10 url = https://github.com/x10-lang/x10-highlighting -[submodule "vendor/grammars/language-babel"] - path = vendor/grammars/language-babel - url = https://github.com/gandm/language-babel [submodule "vendor/grammars/UrWeb-Language-Definition"] path = vendor/grammars/UrWeb-Language-Definition url = https://github.com/gwalborn/UrWeb-Language-Definition.git @@ -669,8 +663,8 @@ path = vendor/grammars/pig-latin url = https://github.com/goblindegook/sublime-text-pig-latin [submodule "vendor/grammars/sourcepawn"] -path = vendor/grammars/sourcepawn -url = https://github.com/austinwagner/sublime-sourcepawn + path = vendor/grammars/sourcepawn + url = https://github.com/github-linguist/sublime-sourcepawn [submodule "vendor/grammars/gdscript"] path = vendor/grammars/gdscript url = https://github.com/beefsack/GDScript-sublime @@ -785,6 +779,21 @@ url = https://github.com/austinwagner/sublime-sourcepawn [submodule "vendor/grammars/xquery"] path = vendor/grammars/xquery url = https://github.com/textmate/xquery.tmbundle +[submodule "vendor/grammars/language-rpm-spec"] + path = vendor/grammars/language-rpm-spec + url = https://github.com/waveclaw/language-rpm-spec [submodule "vendor/grammars/language-emacs-lisp"] path = vendor/grammars/language-emacs-lisp url = https://github.com/Alhadis/language-emacs-lisp +[submodule "vendor/grammars/language-babel"] + path = vendor/grammars/language-babel + url = https://github.com/github-linguist/language-babel +[submodule "vendor/CodeMirror"] + path = vendor/CodeMirror + url = https://github.com/codemirror/CodeMirror +[submodule "vendor/grammars/MQL5-sublime"] + path = vendor/grammars/MQL5-sublime + url = https://github.com/mqsoft/MQL5-sublime +[submodule "vendor/grammars/actionscript3-tmbundle"] + path = vendor/grammars/actionscript3-tmbundle + url = https://github.com/simongregory/actionscript3-tmbundle diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec00ae14..80b20508 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ To add support for a new extension: In addition, if this extension is already listed in [`languages.yml`][languages] then sometimes a few more steps will need to be taken: 0. Make sure that example `.yourextension` files are present in the [samples directory][samples] for each language that uses `.yourextension`. -0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.yourextension` files. (ping @arfon or @bkeepers to help with this) to ensure we're not misclassifying files. +0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.yourextension` files. (ping **@arfon** or **@bkeepers** to help with this) to ensure we're not misclassifying files. 0. If the Bayesian classifier does a bad job with the sample `.yourextension` files then a [heuristic](https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb) may need to be written to help. @@ -27,18 +27,16 @@ We try only to add languages once they have some usage on GitHub. In most cases To add support for a new language: -0. Add an entry for your language to [`languages.yml`][languages]. -0. Add a grammar for your language. Please only add grammars that have [one of these licenses](https://github.com/github/linguist/blob/257425141d4e2a5232786bf0b13c901ada075f93/vendor/licenses/config.yml#L2-L11). - 0. Add your grammar as a submodule: `git submodule add https://github.com/JaneSmith/MyGrammar vendor/grammars/MyGrammar`. - 0. Add your grammar to [`grammars.yml`][grammars] by running `script/convert-grammars --add vendor/grammars/MyGrammar`. - 0. Download the license for the grammar: `script/licensed`. Be careful to only commit the file for the new grammar, as this script may update licenses for other grammars as well. +0. Add an entry for your language to [`languages.yml`][languages]. Omit the `language_id` field for now. +0. Add a grammar for your language: `script/add-grammar https://github.com/JaneSmith/MyGrammar`. Please only add grammars that have [one of these licenses][licenses]. 0. Add samples for your language to the [samples directory][samples] in the correct subdirectory. +0. Add a `language_id` for your language using `script/set-language-ids`. **You should only ever need to run `script/set-language-ids --update`. Anything other than this risks breaking GitHub search :cry:** 0. Open a pull request, linking to a [GitHub search result](https://github.com/search?utf8=%E2%9C%93&q=extension%3Aboot+NOT+nothack&type=Code&ref=searchresults) showing in-the-wild usage. In addition, if your new language defines an extension that's already listed in [`languages.yml`][languages] (such as `.foo`) then sometimes a few more steps will need to be taken: 0. Make sure that example `.foo` files are present in the [samples directory][samples] for each language that uses `.foo`. -0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.foo` files. (ping @arfon or @bkeepers to help with this) to ensure we're not misclassifying files. +0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.foo` files. (ping **@arfon** or **@bkeepers** to help with this) to ensure we're not misclassifying files. 0. If the Bayesian classifier does a bad job with the sample `.foo` files then a [heuristic](https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb) may need to be written to help. Remember, the goal here is to try and avoid false positives! @@ -81,10 +79,10 @@ Here's our current build status: [![Build Status](https://api.travis-ci.org/gith Linguist is maintained with :heart: by: -- @arfon (GitHub Staff) -- @larsbrinkhoff -- @pchaigno - +- **@arfon** (GitHub Staff) +- **@larsbrinkhoff** +- **@pchaigno** + As Linguist is a production dependency for GitHub we have a couple of workflow restrictions: - Anyone with commit rights can merge Pull Requests provided that there is a :+1: from a GitHub member of staff @@ -112,5 +110,6 @@ If you are the current maintainer of this gem: [grammars]: /grammars.yml [languages]: /lib/linguist/languages.yml +[licenses]: https://github.com/github/linguist/blob/257425141d4e2a5232786bf0b13c901ada075f93/vendor/licenses/config.yml#L2-L11 [samples]: /samples [new-issue]: https://github.com/github/linguist/issues/new diff --git a/github-linguist.gemspec b/github-linguist.gemspec index 10a85f34..f9f6ccc6 100644 --- a/github-linguist.gemspec +++ b/github-linguist.gemspec @@ -26,6 +26,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'yajl-ruby' s.add_development_dependency 'color-proximity', '~> 0.2.1' s.add_development_dependency 'licensed' - s.add_development_dependency 'licensee', '>= 8.3.0' + s.add_development_dependency 'licensee', '>= 8.6.0' end diff --git a/grammars.yml b/grammars.yml index 916e3156..4a059389 100755 --- a/grammars.yml +++ b/grammars.yml @@ -8,9 +8,9 @@ vendor/grammars/Agda.tmbundle: - source.agda vendor/grammars/Alloy.tmbundle: - source.alloy -vendor/grammars/AutoHotkey/: +vendor/grammars/AutoHotkey: - source.ahk -vendor/grammars/BrightScript.tmbundle/: +vendor/grammars/BrightScript.tmbundle: - source.brightauthorproject - source.brightscript vendor/grammars/ColdFusion: @@ -20,13 +20,13 @@ vendor/grammars/ColdFusion: - text.html.cfm vendor/grammars/Docker.tmbundle: - source.dockerfile -vendor/grammars/Elm/: +vendor/grammars/Elm/Syntaxes: - source.elm - text.html.mediawiki.elm-build-output - text.html.mediawiki.elm-documentation vendor/grammars/FreeMarker.tmbundle: - text.html.ftl -vendor/grammars/G-Code/: +vendor/grammars/G-Code: - source.LS - source.MCPOST - source.MOD @@ -39,7 +39,7 @@ vendor/grammars/IDL-Syntax: vendor/grammars/Isabelle.tmbundle: - source.isabelle.root - source.isabelle.theory -vendor/grammars/JSyntax/: +vendor/grammars/JSyntax: - source.j vendor/grammars/Julia.tmbundle: - source.julia @@ -47,10 +47,12 @@ vendor/grammars/Lean.tmbundle: - source.lean vendor/grammars/LiveScript.tmbundle: - source.livescript +vendor/grammars/MQL5-sublime: +- source.mql5 vendor/grammars/MagicPython: - source.python - source.regexp.python -vendor/grammars/Modelica/: +vendor/grammars/Modelica: - source.modelica vendor/grammars/NSIS: - source.nsis @@ -60,7 +62,7 @@ vendor/grammars/NimLime: - source.nimcfg vendor/grammars/PHP-Twig.tmbundle: - text.html.twig -vendor/grammars/PogoScript.tmbundle/: +vendor/grammars/PogoScript.tmbundle: - source.pogoscript vendor/grammars/RDoc.tmbundle: - text.rdoc @@ -75,10 +77,10 @@ vendor/grammars/Scalate.tmbundle: - text.html.ssp vendor/grammars/Slash.tmbundle: - text.html.slash -vendor/grammars/Stata.tmbundle/: +vendor/grammars/Stata.tmbundle: - source.mata - source.stata -vendor/grammars/Stylus/: +vendor/grammars/Stylus: - source.stylus vendor/grammars/Sublime-Coq: - source.coq @@ -88,7 +90,7 @@ vendor/grammars/Sublime-Lasso: - file.lasso vendor/grammars/Sublime-Loom: - source.loomscript -vendor/grammars/Sublime-Modula-2/: +vendor/grammars/Sublime-Modula-2: - source.modula2 vendor/grammars/Sublime-Nit: - source.nit @@ -103,26 +105,24 @@ vendor/grammars/Sublime-SQF-Language: vendor/grammars/Sublime-Text-2-OpenEdge-ABL: - source.abl - text.html.abl -vendor/grammars/Sublime-VimL: -- source.viml vendor/grammars/SublimeBrainfuck: - source.bf -vendor/grammars/SublimeClarion/: +vendor/grammars/SublimeClarion: - source.clarion -vendor/grammars/SublimeGDB/: +vendor/grammars/SublimeGDB: - source.disasm - source.gdb - source.gdb.session - source.gdbregs -vendor/grammars/SublimePapyrus/: +vendor/grammars/SublimePapyrus: - source.papyrus.skyrim -vendor/grammars/SublimePuppet/: +vendor/grammars/SublimePuppet: - source.puppet vendor/grammars/SublimeXtend: - source.xtend vendor/grammars/TLA: - source.tla -vendor/grammars/TXL/: +vendor/grammars/TXL: - source.txl vendor/grammars/Textmate-Gosu-Bundle: - source.gosu.2 @@ -136,7 +136,7 @@ vendor/grammars/X10: - source.x10 vendor/grammars/abap.tmbundle: - source.abap -vendor/grammars/actionscript3-tmbundle: +vendor/grammars/actionscript3-tmbundle/: - source.actionscript.3 - text.html.asdoc - text.xml.flex-config @@ -151,20 +151,20 @@ vendor/grammars/antlr.tmbundle: vendor/grammars/apache.tmbundle: - source.apache-config - source.apache-config.mod_perl -vendor/grammars/api-blueprint-sublime-plugin/: +vendor/grammars/api-blueprint-sublime-plugin: - text.html.markdown.source.gfm.apib - text.html.markdown.source.gfm.mson vendor/grammars/applescript.tmbundle: - source.applescript -vendor/grammars/asciidoc.tmbundle/: +vendor/grammars/asciidoc.tmbundle: - text.html.asciidoc vendor/grammars/asp.tmbundle: - source.asp - text.html.asp -vendor/grammars/assembly/: +vendor/grammars/assembly: - objdump.x86asm - source.x86asm -vendor/grammars/atom-fsharp/: +vendor/grammars/atom-fsharp: - source.fsharp - source.fsharp.fsi - source.fsharp.fsl @@ -174,16 +174,16 @@ vendor/grammars/atom-language-1c-bsl: - source.sdbl vendor/grammars/atom-language-clean: - source.clean -vendor/grammars/atom-language-purescript/: +vendor/grammars/atom-language-purescript: - source.purescript vendor/grammars/atom-language-srt: - text.srt -vendor/grammars/atom-language-stan/: +vendor/grammars/atom-language-stan: - source.stan vendor/grammars/atom-salt: - source.python.salt - source.yaml.salt -vendor/grammars/atomic-dreams/: +vendor/grammars/atomic-dreams: - source.dm - source.dmf vendor/grammars/ats: @@ -194,7 +194,7 @@ vendor/grammars/bison.tmbundle: - source.bison vendor/grammars/blitzmax: - source.blitzmax -vendor/grammars/boo/: +vendor/grammars/boo: - source.boo vendor/grammars/bro-sublime: - source.bro @@ -219,7 +219,7 @@ vendor/grammars/cool-tmbundle: vendor/grammars/cpp-qt.tmbundle: - source.c++.qt - source.qmake -vendor/grammars/creole/: +vendor/grammars/creole: - text.html.creole vendor/grammars/css.tmbundle: - source.css @@ -243,9 +243,7 @@ vendor/grammars/dylan.tmbundle: - source.dylan - source.lid - source.makegen -vendor/grammars/ebundles/Bundles/MSDOS batch file.tmbundle: -- source.dosbatch -vendor/grammars/ec.tmbundle/: +vendor/grammars/ec.tmbundle: - source.c.ec vendor/grammars/eiffel.tmbundle: - source.eiffel @@ -270,9 +268,9 @@ vendor/grammars/forth: vendor/grammars/fortran.tmbundle: - source.fortran - source.fortran.modern -vendor/grammars/gap-tmbundle/: +vendor/grammars/gap-tmbundle: - source.gap -vendor/grammars/gdscript/: +vendor/grammars/gdscript: - source.gdscript vendor/grammars/gettext.tmbundle: - source.po @@ -300,7 +298,7 @@ vendor/grammars/idl.tmbundle: - source.idl - source.idl-dlm - text.idl-idldoc -vendor/grammars/idris/: +vendor/grammars/idris: - source.idris vendor/grammars/ini.tmbundle: - source.ini @@ -332,12 +330,14 @@ vendor/grammars/language-apl: - source.apl vendor/grammars/language-asn1: - source.asn -vendor/grammars/language-babel/: +vendor/grammars/language-babel: - source.js.jsx - source.regexp.babel -vendor/grammars/language-blade/: +vendor/grammars/language-batchfile: +- source.batchfile +vendor/grammars/language-blade: - text.html.php.blade -vendor/grammars/language-click/: +vendor/grammars/language-click: - source.click vendor/grammars/language-clojure: - source.clojure @@ -377,12 +377,13 @@ vendor/grammars/language-inform7: - source.inform7 vendor/grammars/language-javascript: - source.js +- source.js.embedded.html - source.js.regexp - source.js.regexp.replacement -vendor/grammars/language-jsoniq/: +vendor/grammars/language-jsoniq: - source.jq - source.xq -vendor/grammars/language-less/: +vendor/grammars/language-less: - source.css.less vendor/grammars/language-maxscript: - source.maxscript @@ -402,6 +403,9 @@ vendor/grammars/language-roff: - source.pic - text.roff - text.runoff +vendor/grammars/language-rpm-spec: +- source.changelogs.rpm-spec +- source.rpm-spec vendor/grammars/language-shellscript: - source.shell - text.shell-session @@ -411,6 +415,8 @@ vendor/grammars/language-toc-wow: - source.toc vendor/grammars/language-turing: - source.turing +vendor/grammars/language-viml: +- source.viml vendor/grammars/language-wavefront: - source.wavefront.mtl - source.wavefront.obj @@ -418,7 +424,7 @@ vendor/grammars/language-xbase: - source.harbour vendor/grammars/language-yaml: - source.yaml -vendor/grammars/language-yang/: +vendor/grammars/language-yang: - source.yang vendor/grammars/latex.tmbundle: - text.bibtex @@ -452,11 +458,11 @@ vendor/grammars/matlab.tmbundle: - source.octave vendor/grammars/maven.tmbundle: - text.xml.pom -vendor/grammars/mediawiki.tmbundle/: +vendor/grammars/mediawiki.tmbundle: - text.html.mediawiki vendor/grammars/mercury-tmlanguage: - source.mercury -vendor/grammars/monkey/: +vendor/grammars/monkey: - source.monkey vendor/grammars/moonscript-tmbundle: - source.moonscript @@ -490,9 +496,9 @@ vendor/grammars/parrot: - source.parrot.pir vendor/grammars/pascal.tmbundle: - source.pascal -vendor/grammars/pawn-sublime-language/: +vendor/grammars/pawn-sublime-language: - source.pawn -vendor/grammars/perl.tmbundle/: +vendor/grammars/perl.tmbundle: - source.perl - source.perl.6 vendor/grammars/perl6fe: @@ -503,7 +509,7 @@ vendor/grammars/php-smarty.tmbundle: - text.html.smarty vendor/grammars/php.tmbundle: - text.html.php -vendor/grammars/pig-latin/: +vendor/grammars/pig-latin: - source.pig_latin vendor/grammars/pike-textmate: - source.pike @@ -542,11 +548,11 @@ vendor/grammars/scilab.tmbundle: - source.scilab vendor/grammars/secondlife-lsl: - source.lsl -vendor/grammars/smali-sublime/smali.tmLanguage: +vendor/grammars/smali-sublime: - source.smali vendor/grammars/smalltalk-tmbundle: - source.smalltalk -vendor/grammars/sourcepawn/: +vendor/grammars/sourcepawn: - source.sp vendor/grammars/sql.tmbundle: - source.sql @@ -557,9 +563,9 @@ vendor/grammars/standard-ml.tmbundle: - source.ml vendor/grammars/sublime-MuPAD: - source.mupad -vendor/grammars/sublime-aspectj/: +vendor/grammars/sublime-aspectj: - source.aspectj -vendor/grammars/sublime-autoit/: +vendor/grammars/sublime-autoit: - source.autoit vendor/grammars/sublime-befunge: - source.befunge @@ -567,12 +573,12 @@ vendor/grammars/sublime-bsv: - source.bsv vendor/grammars/sublime-cirru: - source.cirru -vendor/grammars/sublime-clips/: +vendor/grammars/sublime-clips: - source.clips vendor/grammars/sublime-glsl: - source.essl - source.glsl -vendor/grammars/sublime-golo/: +vendor/grammars/sublime-golo: - source.golo vendor/grammars/sublime-mask: - source.mask @@ -581,27 +587,27 @@ vendor/grammars/sublime-netlinx: - source.netlinx.erb vendor/grammars/sublime-nginx: - source.nginx -vendor/grammars/sublime-opal/: +vendor/grammars/sublime-opal: - source.opal - source.opalsysdefs vendor/grammars/sublime-pony: - source.pony -vendor/grammars/sublime-rexx/: +vendor/grammars/sublime-rexx: - source.rexx vendor/grammars/sublime-robot-plugin: - text.robot vendor/grammars/sublime-rust: - source.rust -vendor/grammars/sublime-spintools/: +vendor/grammars/sublime-spintools: - source.regexp.spin - source.spin vendor/grammars/sublime-tea: - source.tea vendor/grammars/sublime-terra: - source.terra -vendor/grammars/sublime-text-ox/: +vendor/grammars/sublime-text-ox: - source.ox -vendor/grammars/sublime-typescript/: +vendor/grammars/sublime-typescript: - source.ts - source.tsx - text.error-list @@ -613,9 +619,9 @@ vendor/grammars/sublime_cobol: - source.cobol - source.jcl - source.opencobol -vendor/grammars/sublimeassembly/: +vendor/grammars/sublimeassembly: - source.assembly -vendor/grammars/sublimeprolog/: +vendor/grammars/sublimeprolog: - source.prolog - source.prolog.eclipse vendor/grammars/sublimetext-cuda-cpp: @@ -638,7 +644,7 @@ vendor/grammars/vhdl: - source.vhdl vendor/grammars/vue-syntax-highlight: - text.html.vue -vendor/grammars/xc.tmbundle/: +vendor/grammars/xc.tmbundle: - source.xc vendor/grammars/xml.tmbundle: - text.xml diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index 339cca4e..a9ca4914 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -56,6 +56,7 @@ module Linguist generated_net_specflow_feature_file? || composer_lock? || node_modules? || + go_vendor? || npm_shrinkwrap? || godeps? || generated_by_zephir? || @@ -304,6 +305,14 @@ module Linguist !!name.match(/node_modules\//) end + # Internal: Is the blob part of the Go vendor/ tree, + # not meant for humans in pull requests. + # + # Returns true or false. + def go_vendor? + !!name.match(/vendor\/((?!-)[-0-9A-Za-z]+(? [#] + # + # Returns the matching Language + def self.find_by_id(language_id) + @language_id_index[language_id.to_i] + end # Public: Look up Language by its name. # @@ -251,6 +267,7 @@ module Linguist # Returns an Array of Languages. def self.ace_modes warn "This method will be deprecated in a future 5.x release. Every language now has an `ace_mode` set." + warn caller @ace_modes ||= all.select(&:ace_mode).sort_by { |lang| lang.name.downcase } end @@ -284,11 +301,16 @@ module Linguist end @ace_mode = attributes[:ace_mode] + @codemirror_mode = attributes[:codemirror_mode] + @codemirror_mime_type = attributes[:codemirror_mime_type] @wrap = attributes[:wrap] || false # Set legacy search term @search_term = attributes[:search_term] || default_alias_name + # Set the language_id + @language_id = attributes[:language_id] + # Set extensions or default to []. @extensions = attributes[:extensions] || [] @interpreters = attributes[:interpreters] || [] @@ -351,6 +373,17 @@ module Linguist # Returns the name String attr_reader :search_term + # Public: Get language_id (used in GitHub search) + # + # Examples + # + # # => "1" + # # => "2" + # # => "3" + # + # Returns the integer language_id + attr_reader :language_id + # Public: Get the name of a TextMate-compatible scope # # Returns the scope @@ -367,6 +400,31 @@ module Linguist # Returns a String name or nil attr_reader :ace_mode + # Public: Get CodeMirror mode + # + # Maps to a directory in the `mode/` source code. + # https://github.com/codemirror/CodeMirror/tree/master/mode + # + # Examples + # + # # => "nil" + # # => "javascript" + # # => "clike" + # + # Returns a String name or nil + attr_reader :codemirror_mode + + # Public: Get CodeMirror MIME type mode + # + # Examples + # + # # => "nil" + # # => "text/x-javascript" + # # => "text/x-csrc" + # + # Returns a String name or nil + attr_reader :codemirror_mime_type + # Public: Should language lines be wrapped # # Returns true or false @@ -543,10 +601,13 @@ module Linguist :aliases => options['aliases'], :tm_scope => options['tm_scope'], :ace_mode => options['ace_mode'], + :codemirror_mode => options['codemirror_mode'], + :codemirror_mime_type => options['codemirror_mime_type'], :wrap => options['wrap'], :group_name => options['group'], :searchable => options.fetch('searchable', true), :search_term => options['search_term'], + :language_id => options['language_id'], :extensions => Array(options['extensions']), :interpreters => options['interpreters'].sort, :filenames => options['filenames'], diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 829b0446..47cb2215 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -6,6 +6,8 @@ # ace_mode - A String name of the Ace Mode used for highlighting whenever # a file is edited. This must match one of the filenames in http://git.io/3XO_Cg. # Use "text" if a mode does not exist. +# codemirror_mode - A String name of the CodeMirror Mode used for highlighting whenever a file is edited. +# This must match a mode from https://git.io/vi9Fx # wrap - Boolean wrap to enable line wrapping (default: false) # extensions - An Array of associated extensions (the first one is # considered the primary extension, the others should be @@ -14,7 +16,10 @@ # searchable - Boolean flag to enable searching (defaults to true) # search_term - Deprecated: Some languages may be indexed under a # different alias. Avoid defining new exceptions. -# color - CSS hex color to represent the language. +# language_id - Integer used as a language-name-independent indexed field so that we can rename +# languages in Linguist without reindexing all the code on GitHub. Must not be +# changed for existing languages without the explicit permission of GitHub staff. +# color - CSS hex color to represent the language. Only used if type is "programming" or "prose" # tm_scope - The TextMate scope that represents this programming # language. This should match one of the scopes listed in # the grammars.yml file. Use "none" if there is no grammar @@ -27,79 +32,85 @@ # # Please keep this list alphabetized. Capitalization comes before lowercase. +--- 1C Enterprise: type: programming color: "#814CCC" extensions: - - .bsl - - .os + - ".bsl" + - ".os" tm_scope: source.bsl ace_mode: text - + language_id: 0 ABAP: type: programming color: "#E8274B" extensions: - - .abap + - ".abap" ace_mode: abap - + language_id: 1 AGS Script: type: programming color: "#B9D9FF" aliases: - ags extensions: - - .asc - - .ash + - ".asc" + - ".ash" tm_scope: source.c++ ace_mode: c_cpp - + codemirror_mode: clike + codemirror_mime_type: text/x-c++src + language_id: 2 AMPL: type: programming color: "#E6EFBB" extensions: - - .ampl - - .mod + - ".ampl" + - ".mod" tm_scope: source.ampl ace_mode: text - + language_id: 3 ANTLR: type: programming color: "#9DC3FF" extensions: - - .g4 + - ".g4" ace_mode: text - + language_id: 4 API Blueprint: type: markup color: "#2ACCA8" ace_mode: markdown extensions: - - .apib + - ".apib" tm_scope: text.html.markdown.source.gfm.apib - + language_id: 5 APL: type: programming color: "#5A8164" extensions: - - .apl - - .dyalog + - ".apl" + - ".dyalog" interpreters: - apl - aplx - dyalog tm_scope: source.apl ace_mode: text - + codemirror_mode: apl + codemirror_mime_type: text/apl + language_id: 6 ASN.1: type: data - color: "#aeead0" extensions: - - .asn - - .asn1 + - ".asn" + - ".asn1" tm_scope: source.asn ace_mode: text - + codemirror_mode: asn.1 + codemirror_mime_type: text/x-ttcn-asn + language_id: 7 ASP: type: programming color: "#6a40fd" @@ -109,27 +120,29 @@ ASP: - aspx - aspx-vb extensions: - - .asp - - .asax - - .ascx - - .ashx - - .asmx - - .aspx - - .axd + - ".asp" + - ".asax" + - ".ascx" + - ".ashx" + - ".asmx" + - ".aspx" + - ".axd" ace_mode: text - + codemirror_mode: htmlembedded + codemirror_mime_type: application/x-aspx + language_id: 8 ATS: type: programming color: "#1ac620" aliases: - ats2 extensions: - - .dats - - .hats - - .sats + - ".dats" + - ".hats" + - ".sats" tm_scope: source.ats ace_mode: ocaml - + language_id: 9 ActionScript: type: programming tm_scope: source.actionscript.3 @@ -140,35 +153,35 @@ ActionScript: - actionscript3 - as3 extensions: - - .as + - ".as" ace_mode: actionscript - + language_id: 10 Ada: type: programming color: "#02f88c" extensions: - - .adb - - .ada - - .ads + - ".adb" + - ".ada" + - ".ads" aliases: - ada95 - ada2005 ace_mode: ada - + language_id: 11 Agda: type: programming color: "#315665" extensions: - - .agda + - ".agda" ace_mode: text - + language_id: 12 Alloy: - type: programming # 'modeling' would be more appropiate + type: programming color: "#64C800" extensions: - - .als + - ".als" ace_mode: text - + language_id: 13 Alpine Abuild: type: programming group: Shell @@ -179,7 +192,9 @@ Alpine Abuild: - APKBUILD tm_scope: source.shell ace_mode: sh - + codemirror_mode: shell + codemirror_mime_type: text/x-sh + language_id: 14 Ant Build System: type: data tm_scope: text.xml.ant @@ -187,80 +202,85 @@ Ant Build System: - ant.xml - build.xml ace_mode: xml - + codemirror_mode: xml + codemirror_mime_type: application/xml + language_id: 15 ApacheConf: type: markup aliases: - aconf - apache extensions: - - .apacheconf - - .vhost + - ".apacheconf" + - ".vhost" tm_scope: source.apache-config ace_mode: apache_conf - + language_id: 16 Apex: type: programming extensions: - - .cls + - ".cls" tm_scope: source.java ace_mode: java - + codemirror_mode: clike + codemirror_mime_type: text/x-java + language_id: 17 Apollo Guidance Computer: type: programming - color: "#0B3D91" group: Assembly extensions: - - .agc + - ".agc" tm_scope: source.agc ace_mode: assembly_x86 - + language_id: 18 AppleScript: type: programming aliases: - osascript extensions: - - .applescript - - .scpt + - ".applescript" + - ".scpt" interpreters: - osascript ace_mode: applescript color: "#101F1F" - + language_id: 19 Arc: type: programming color: "#aa2afe" extensions: - - .arc + - ".arc" tm_scope: none ace_mode: text - + language_id: 20 Arduino: type: programming color: "#bd79d1" extensions: - - .ino + - ".ino" tm_scope: source.c++ ace_mode: c_cpp - + codemirror_mode: clike + codemirror_mime_type: text/x-c++src + language_id: 21 AsciiDoc: type: prose ace_mode: asciidoc wrap: true extensions: - - .asciidoc - - .adoc - - .asc + - ".asciidoc" + - ".adoc" + - ".asc" tm_scope: text.html.asciidoc - + language_id: 22 AspectJ: type: programming color: "#a957b0" extensions: - - .aj + - ".aj" tm_scope: source.aspectj ace_mode: text - + language_id: 23 Assembly: type: programming color: "#6E4C13" @@ -268,31 +288,31 @@ Assembly: aliases: - nasm extensions: - - .asm - - .a51 - - .inc - - .nasm + - ".asm" + - ".a51" + - ".inc" + - ".nasm" tm_scope: source.assembly ace_mode: assembly_x86 - + language_id: 24 Augeas: type: programming extensions: - - .aug + - ".aug" tm_scope: none ace_mode: text - + language_id: 25 AutoHotkey: type: programming color: "#6594b9" aliases: - ahk extensions: - - .ahk - - .ahkl + - ".ahk" + - ".ahkl" tm_scope: source.ahk ace_mode: autohotkey - + language_id: 26 AutoIt: type: programming color: "#1C3552" @@ -301,25 +321,25 @@ AutoIt: - AutoIt3 - AutoItScript extensions: - - .au3 + - ".au3" tm_scope: source.autoit ace_mode: autohotkey - + language_id: 27 Awk: type: programming extensions: - - .awk - - .auk - - .gawk - - .mawk - - .nawk + - ".awk" + - ".auk" + - ".gawk" + - ".mawk" + - ".nawk" interpreters: - awk - gawk - mawk - nawk ace_mode: text - + language_id: 28 Batchfile: type: programming search_term: bat @@ -329,43 +349,42 @@ Batchfile: - dosbatch - winbatch extensions: - - .bat - - .cmd - tm_scope: source.dosbatch + - ".bat" + - ".cmd" + tm_scope: source.batchfile ace_mode: batchfile color: "#C1F12E" - + language_id: 29 Befunge: type: programming extensions: - - .befunge + - ".befunge" ace_mode: text - + language_id: 30 Bison: type: programming group: Yacc tm_scope: source.bison extensions: - - .bison + - ".bison" ace_mode: text - color: "#6A463F" - + language_id: 31 BitBake: type: programming tm_scope: none extensions: - - .bb + - ".bb" ace_mode: text - + language_id: 32 Blade: type: markup group: HTML extensions: - - .blade - - .blade.php + - ".blade" + - ".blade.php" tm_scope: text.html.php.blade ace_mode: text - + language_id: 33 BlitzBasic: type: programming aliases: @@ -374,290 +393,323 @@ BlitzBasic: - blitzplus - bplus extensions: - - .bb - - .decls + - ".bb" + - ".decls" tm_scope: source.blitzmax ace_mode: text - + language_id: 34 BlitzMax: type: programming color: "#cd6400" extensions: - - .bmx + - ".bmx" aliases: - bmax ace_mode: text - + language_id: 35 Bluespec: type: programming extensions: - - .bsv + - ".bsv" tm_scope: source.bsv ace_mode: verilog - + language_id: 36 Boo: type: programming color: "#d4bec1" extensions: - - .boo + - ".boo" ace_mode: text tm_scope: source.boo - + language_id: 37 Brainfuck: type: programming color: "#2F2530" extensions: - - .b - - .bf + - ".b" + - ".bf" tm_scope: source.bf ace_mode: text - + codemirror_mode: brainfuck + codemirror_mime_type: text/x-brainfuck + language_id: 38 Brightscript: type: programming extensions: - - .brs + - ".brs" tm_scope: source.brightscript ace_mode: text - + language_id: 39 Bro: type: programming extensions: - - .bro + - ".bro" ace_mode: text - + language_id: 40 C: type: programming color: "#555555" extensions: - - .c - - .cats - - .h - - .idc - - .w + - ".c" + - ".cats" + - ".h" + - ".idc" + - ".w" interpreters: - tcc ace_mode: c_cpp - + codemirror_mode: clike + codemirror_mime_type: text/x-csrc + language_id: 41 C#: type: programming ace_mode: csharp + codemirror_mode: clike + codemirror_mime_type: text/x-csharp tm_scope: source.cs search_term: csharp color: "#178600" aliases: - csharp extensions: - - .cs - - .cake - - .cshtml - - .csx - + - ".cs" + - ".cake" + - ".cshtml" + - ".csx" + language_id: 42 C++: type: programming ace_mode: c_cpp + codemirror_mode: clike + codemirror_mime_type: text/x-c++src search_term: cpp color: "#f34b7d" aliases: - cpp extensions: - - .cpp - - .c++ - - .cc - - .cp - - .cxx - - .h - - .h++ - - .hh - - .hpp - - .hxx - - .inc - - .inl - - .ipp - - .tcc - - .tpp - + - ".cpp" + - ".c++" + - ".cc" + - ".cp" + - ".cxx" + - ".h" + - ".h++" + - ".hh" + - ".hpp" + - ".hxx" + - ".inc" + - ".inl" + - ".ipp" + - ".tcc" + - ".tpp" + language_id: 43 C-ObjDump: type: data extensions: - - .c-objdump + - ".c-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - + language_id: 44 C2hs Haskell: type: programming group: Haskell aliases: - c2hs extensions: - - .chs + - ".chs" tm_scope: source.haskell ace_mode: haskell - + codemirror_mode: haskell + codemirror_mime_type: text/x-haskell + language_id: 45 CLIPS: type: programming extensions: - - .clp + - ".clp" tm_scope: source.clips ace_mode: text - + language_id: 46 CMake: type: programming extensions: - - .cmake - - .cmake.in + - ".cmake" + - ".cmake.in" filenames: - CMakeLists.txt ace_mode: text - + codemirror_mode: cmake + codemirror_mime_type: text/x-cmake + language_id: 47 COBOL: type: programming extensions: - - .cob - - .cbl - - .ccp - - .cobol - - .cpy + - ".cob" + - ".cbl" + - ".ccp" + - ".cobol" + - ".cpy" ace_mode: cobol - + codemirror_mode: cobol + codemirror_mime_type: text/x-cobol + language_id: 48 COLLADA: type: data extensions: - - .dae + - ".dae" tm_scope: text.xml ace_mode: xml - + codemirror_mode: xml + codemirror_mime_type: text/xml + language_id: 49 +CSON: + type: data + group: CoffeeScript + tm_scope: source.coffee + ace_mode: coffee + codemirror_mode: coffeescript + codemirror_mime_type: text/x-coffeescript + searchable: false + extensions: + - ".cson" + language_id: 424 CSS: type: markup tm_scope: source.css ace_mode: css + codemirror_mode: css + codemirror_mime_type: text/css color: "#563d7c" extensions: - - .css - + - ".css" + language_id: 50 CSV: type: data ace_mode: text tm_scope: none extensions: - - .csv - + - ".csv" + language_id: 51 Cap'n Proto: type: programming tm_scope: source.capnp extensions: - - .capnp + - ".capnp" ace_mode: text - + language_id: 52 CartoCSS: type: programming aliases: - Carto extensions: - - .mss + - ".mss" ace_mode: text tm_scope: source.css.mss - + language_id: 53 Ceylon: type: programming extensions: - - .ceylon + - ".ceylon" ace_mode: text - + language_id: 54 Chapel: type: programming color: "#8dc63f" aliases: - chpl extensions: - - .chpl + - ".chpl" ace_mode: text - + language_id: 55 Charity: type: programming extensions: - - .ch + - ".ch" tm_scope: none ace_mode: text - + language_id: 56 ChucK: type: programming extensions: - - .ck + - ".ck" tm_scope: source.java ace_mode: java - + codemirror_mode: clike + codemirror_mime_type: text/x-java + language_id: 57 Cirru: type: programming color: "#ccccff" ace_mode: cirru extensions: - - .cirru - + - ".cirru" + language_id: 58 Clarion: type: programming color: "#db901e" ace_mode: text extensions: - - .clw + - ".clw" tm_scope: source.clarion - + language_id: 59 Clean: type: programming color: "#3F85AF" extensions: - - .icl - - .dcl + - ".icl" + - ".dcl" tm_scope: source.clean ace_mode: text - + language_id: 60 Click: type: programming color: "#E4E6F3" extensions: - - .click + - ".click" tm_scope: source.click ace_mode: text - + language_id: 61 Clojure: type: programming ace_mode: clojure + codemirror_mode: clojure + codemirror_mime_type: text/x-clojure color: "#db5855" extensions: - - .clj - - .boot - - .cl2 - - .cljc - - .cljs - - .cljs.hl - - .cljscm - - .cljx - - .hic + - ".clj" + - ".boot" + - ".cl2" + - ".cljc" + - ".cljs" + - ".cljs.hl" + - ".cljscm" + - ".cljx" + - ".hic" filenames: - riemann.config - + language_id: 62 CoffeeScript: type: programming tm_scope: source.coffee ace_mode: coffee + codemirror_mode: coffeescript + codemirror_mime_type: text/x-coffeescript color: "#244776" aliases: - coffee - coffee-script extensions: - - .coffee - - ._coffee - - .cake - - .cjsx - - .cson - - .iced + - ".coffee" + - "._coffee" + - ".cake" + - ".cjsx" + - ".iced" filenames: - Cakefile interpreters: - coffee - + language_id: 63 ColdFusion: type: programming - group: ColdFusion ace_mode: coldfusion color: "#ed2cd6" search_term: cfm @@ -666,22 +718,21 @@ ColdFusion: - cfml - coldfusion html extensions: - - .cfm - - .cfml + - ".cfm" + - ".cfml" tm_scope: text.html.cfm - + language_id: 64 ColdFusion CFC: type: programming group: ColdFusion ace_mode: coldfusion - color: "#ed2cd6" search_term: cfc aliases: - cfc extensions: - - .cfc + - ".cfc" tm_scope: source.cfscript - + language_id: 65 Common Lisp: type: programming tm_scope: source.lisp @@ -689,14 +740,14 @@ Common Lisp: aliases: - lisp extensions: - - .lisp - - .asd - - .cl - - .l - - .lsp - - .ny - - .podsl - - .sexp + - ".lisp" + - ".asd" + - ".cl" + - ".l" + - ".lsp" + - ".ny" + - ".podsl" + - ".sexp" interpreters: - lisp - sbcl @@ -704,327 +755,362 @@ Common Lisp: - clisp - ecl ace_mode: lisp - + codemirror_mode: commonlisp + codemirror_mime_type: text/x-common-lisp + language_id: 66 Component Pascal: type: programming color: "#B0CE4E" extensions: - - .cp - - .cps + - ".cp" + - ".cps" tm_scope: source.pascal aliases: - delphi - objectpascal ace_mode: pascal - + codemirror_mode: pascal + codemirror_mime_type: text/x-pascal + language_id: 67 Cool: type: programming extensions: - - .cl + - ".cl" tm_scope: source.cool ace_mode: text - + language_id: 68 Coq: type: programming extensions: - - .coq - - .v + - ".coq" + - ".v" ace_mode: text - + language_id: 69 Cpp-ObjDump: type: data extensions: - - .cppobjdump - - .c++-objdump - - .c++objdump - - .cpp-objdump - - .cxx-objdump + - ".cppobjdump" + - ".c++-objdump" + - ".c++objdump" + - ".cpp-objdump" + - ".cxx-objdump" tm_scope: objdump.x86asm aliases: - c++-objdump ace_mode: assembly_x86 - + language_id: 70 Creole: type: prose wrap: true extensions: - - .creole + - ".creole" tm_scope: text.html.creole ace_mode: text - + language_id: 71 Crystal: type: programming color: "#776791" extensions: - - .cr + - ".cr" ace_mode: ruby + codemirror_mode: crystal + codemirror_mime_type: text/x-crystal tm_scope: source.crystal interpreters: - crystal - + language_id: 72 Csound: type: programming aliases: - csound-orc extensions: - - .orc - - .udo + - ".orc" + - ".udo" tm_scope: source.csound ace_mode: text - + language_id: 73 Csound Document: type: programming aliases: - csound-csd extensions: - - .csd + - ".csd" tm_scope: source.csound-document ace_mode: text - + language_id: 74 Csound Score: type: programming aliases: - csound-sco extensions: - - .sco + - ".sco" tm_scope: source.csound-score ace_mode: text - + language_id: 75 Cucumber: type: programming extensions: - - .feature + - ".feature" tm_scope: text.gherkin.feature aliases: - gherkin ace_mode: text color: "#5B2063" - + language_id: 76 Cuda: type: programming extensions: - - .cu - - .cuh + - ".cu" + - ".cuh" tm_scope: source.cuda-c++ ace_mode: c_cpp + codemirror_mode: clike + codemirror_mime_type: text/x-c++src color: "#3A4E3A" - + language_id: 77 Cycript: type: programming extensions: - - .cy + - ".cy" tm_scope: source.js ace_mode: javascript - + codemirror_mode: javascript + codemirror_mime_type: text/javascript + language_id: 78 Cython: type: programming group: Python extensions: - - .pyx - - .pxd - - .pxi + - ".pyx" + - ".pxd" + - ".pxi" aliases: - pyrex ace_mode: text - + codemirror_mode: python + codemirror_mime_type: text/x-cython + language_id: 79 D: type: programming color: "#ba595e" extensions: - - .d - - .di + - ".d" + - ".di" ace_mode: d - + codemirror_mode: d + codemirror_mime_type: text/x-d + language_id: 80 D-ObjDump: type: data extensions: - - .d-objdump + - ".d-objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - + language_id: 81 DIGITAL Command Language: type: programming aliases: - dcl extensions: - - .com + - ".com" tm_scope: none ace_mode: text - + language_id: 82 DM: type: programming color: "#447265" extensions: - - .dm + - ".dm" aliases: - byond tm_scope: source.dm ace_mode: c_cpp - + language_id: 83 DNS Zone: type: data extensions: - - .zone - - .arpa + - ".zone" + - ".arpa" tm_scope: text.zone_file ace_mode: text - + language_id: 84 DTrace: type: programming aliases: - dtrace-script extensions: - - .d + - ".d" interpreters: - dtrace tm_scope: source.c ace_mode: c_cpp - + codemirror_mode: clike + codemirror_mime_type: text/x-csrc + language_id: 85 Darcs Patch: type: data search_term: dpatch aliases: - dpatch extensions: - - .darcspatch - - .dpatch + - ".darcspatch" + - ".dpatch" tm_scope: none ace_mode: text - + language_id: 86 Dart: type: programming color: "#00B4AB" extensions: - - .dart + - ".dart" interpreters: - dart ace_mode: dart - + codemirror_mode: dart + codemirror_mime_type: application/dart + language_id: 87 Diff: type: data extensions: - - .diff - - .patch + - ".diff" + - ".patch" aliases: - udiff tm_scope: source.diff ace_mode: diff - + codemirror_mode: diff + codemirror_mime_type: text/x-diff + language_id: 88 Dockerfile: type: data tm_scope: source.dockerfile extensions: - - .dockerfile + - ".dockerfile" filenames: - Dockerfile ace_mode: dockerfile - + codemirror_mode: dockerfile + codemirror_mime_type: text/x-dockerfile + language_id: 89 Dogescript: type: programming color: "#cca760" extensions: - - .djs + - ".djs" tm_scope: none ace_mode: text - + language_id: 90 Dylan: type: programming color: "#6c616e" extensions: - - .dylan - - .dyl - - .intr - - .lid + - ".dylan" + - ".dyl" + - ".intr" + - ".lid" ace_mode: text - + codemirror_mode: dylan + codemirror_mime_type: text/x-dylan + language_id: 91 E: type: programming color: "#ccce35" extensions: - - .E + - ".E" interpreters: - rune tm_scope: none ace_mode: text - + language_id: 92 ECL: type: programming color: "#8a1267" extensions: - - .ecl - - .eclxml + - ".ecl" + - ".eclxml" tm_scope: none ace_mode: text - + codemirror_mode: ecl + codemirror_mime_type: text/x-ecl + language_id: 93 ECLiPSe: type: programming group: prolog extensions: - - .ecl + - ".ecl" tm_scope: source.prolog.eclipse ace_mode: prolog - + language_id: 94 EJS: type: markup - color: "#a91e50" group: HTML extensions: - - .ejs + - ".ejs" tm_scope: text.html.js ace_mode: ejs - + language_id: 95 EQ: type: programming color: "#a78649" extensions: - - .eq + - ".eq" tm_scope: source.cs ace_mode: csharp - + codemirror_mode: clike + codemirror_mime_type: text/x-csharp + language_id: 96 Eagle: type: markup color: "#814C05" extensions: - - .sch - - .brd + - ".sch" + - ".brd" tm_scope: text.xml ace_mode: xml - + codemirror_mode: xml + codemirror_mime_type: text/xml + language_id: 97 Ecere Projects: type: data group: JavaScript extensions: - - .epj + - ".epj" tm_scope: source.json ace_mode: json - + codemirror_mode: javascript + codemirror_mime_type: application/json + language_id: 98 Eiffel: type: programming color: "#946d57" extensions: - - .e + - ".e" ace_mode: eiffel - + codemirror_mode: eiffel + codemirror_mime_type: text/x-eiffel + language_id: 99 Elixir: type: programming color: "#6e4a7e" extensions: - - .ex - - .exs + - ".ex" + - ".exs" ace_mode: elixir filenames: - mix.lock interpreters: - elixir - + language_id: 100 Elm: type: programming color: "#60B5CC" extensions: - - .elm + - ".elm" tm_scope: source.elm ace_mode: elm - + codemirror_mode: elm + codemirror_mime_type: text/x-elm + language_id: 101 Emacs Lisp: type: programming tm_scope: source.emacs.lisp @@ -1033,43 +1119,55 @@ Emacs Lisp: - elisp - emacs filenames: - - .emacs - - .emacs.desktop - - .spacemacs + - ".abbrev_defs" + - ".emacs" + - ".emacs.desktop" + - ".gnus" + - ".spacemacs" + - ".viper" + - "Project.ede" + - "_emacs" + - "abbrev_defs" extensions: - - .el - - .emacs - - .emacs.desktop + - ".el" + - ".emacs" + - ".emacs.desktop" ace_mode: lisp - + codemirror_mode: commonlisp + codemirror_mime_type: text/x-common-lisp + language_id: 102 EmberScript: type: programming color: "#FFF4F3" extensions: - - .em - - .emberscript + - ".em" + - ".emberscript" tm_scope: source.coffee ace_mode: coffee - + codemirror_mode: coffeescript + codemirror_mime_type: text/x-coffeescript + language_id: 103 Erlang: type: programming color: "#B83998" extensions: - - .erl - - .app.src - - .es - - .escript - - .hrl - - .xrl - - .yrl + - ".erl" + - ".app.src" + - ".es" + - ".escript" + - ".hrl" + - ".xrl" + - ".yrl" filenames: - rebar.config - rebar.config.lock - rebar.lock ace_mode: erlang + codemirror_mode: erlang + codemirror_mime_type: text/x-erlang interpreters: - escript - + language_id: 104 F#: type: programming color: "#b845fc" @@ -1077,225 +1175,250 @@ F#: aliases: - fsharp extensions: - - .fs - - .fsi - - .fsx + - ".fs" + - ".fsi" + - ".fsx" tm_scope: source.fsharp ace_mode: text - + codemirror_mode: mllike + codemirror_mime_type: text/x-fsharp + language_id: 105 FLUX: type: programming color: "#88ccff" extensions: - - .fx - - .flux + - ".fx" + - ".flux" tm_scope: none ace_mode: text - + language_id: 106 FORTRAN: type: programming color: "#4d41b1" extensions: - - .f90 - - .f - - .f03 - - .f08 - - .f77 - - .f95 - - .for - - .fpp + - ".f90" + - ".f" + - ".f03" + - ".f08" + - ".f77" + - ".f95" + - ".for" + - ".fpp" tm_scope: source.fortran.modern ace_mode: text - + codemirror_mode: fortran + codemirror_mime_type: text/x-fortran + language_id: 107 Factor: type: programming color: "#636746" extensions: - - .factor + - ".factor" filenames: - - .factor-boot-rc - - .factor-rc + - ".factor-boot-rc" + - ".factor-rc" ace_mode: text - + codemirror_mode: factor + codemirror_mime_type: text/x-factor + language_id: 108 Fancy: type: programming color: "#7b9db4" extensions: - - .fy - - .fancypack + - ".fy" + - ".fancypack" filenames: - Fakefile ace_mode: text - + language_id: 109 Fantom: type: programming color: "#dbded5" extensions: - - .fan + - ".fan" tm_scope: none ace_mode: text - + language_id: 110 +Filebench WML: + type: programming + extensions: + - ".f" + tm_scope: none + ace_mode: text + language_id: 111 Filterscript: type: programming group: RenderScript extensions: - - .fs + - ".fs" tm_scope: none ace_mode: text - + language_id: 112 Formatted: type: data extensions: - - .for - - .eam.fs + - ".for" + - ".eam.fs" tm_scope: none ace_mode: text - + language_id: 113 Forth: type: programming color: "#341708" extensions: - - .fth - - .4th - - .f - - .for - - .forth - - .fr - - .frt - - .fs + - ".fth" + - ".4th" + - ".f" + - ".for" + - ".forth" + - ".fr" + - ".frt" + - ".fs" ace_mode: forth - + codemirror_mode: forth + codemirror_mime_type: text/x-forth + language_id: 114 FreeMarker: type: programming color: "#0050b2" aliases: - ftl extensions: - - .ftl + - ".ftl" tm_scope: text.html.ftl ace_mode: ftl - + language_id: 115 Frege: type: programming color: "#00cafe" extensions: - - .fr + - ".fr" tm_scope: source.haskell ace_mode: haskell - + language_id: 116 G-code: type: data extensions: - - .g - - .gco - - .gcode + - ".g" + - ".gco" + - ".gcode" tm_scope: source.gcode ace_mode: gcode - + language_id: 117 GAMS: type: programming extensions: - - .gms + - ".gms" tm_scope: none ace_mode: text - + language_id: 118 GAP: type: programming extensions: - - .g - - .gap - - .gd - - .gi - - .tst + - ".g" + - ".gap" + - ".gd" + - ".gi" + - ".tst" tm_scope: source.gap ace_mode: text - + language_id: 119 GAS: type: programming group: Assembly extensions: - - .s - - .ms + - ".s" + - ".ms" tm_scope: source.assembly ace_mode: assembly_x86 - + language_id: 120 GCC Machine Description: type: programming extensions: - - .md + - ".md" tm_scope: source.lisp ace_mode: lisp - + codemirror_mode: commonlisp + codemirror_mime_type: text/x-common-lisp + language_id: 121 GDB: type: programming extensions: - - .gdb - - .gdbinit + - ".gdb" + - ".gdbinit" tm_scope: source.gdb ace_mode: text - + language_id: 122 GDScript: type: programming extensions: - - .gd + - ".gd" tm_scope: source.gdscript ace_mode: text - + language_id: 123 GLSL: type: programming extensions: - - .glsl - - .fp - - .frag - - .frg - - .fs - - .fsh - - .fshader - - .geo - - .geom - - .glslv - - .gshader - - .shader - - .vert - - .vrx - - .vsh - - .vshader + - ".glsl" + - ".fp" + - ".frag" + - ".frg" + - ".fs" + - ".fsh" + - ".fshader" + - ".geo" + - ".geom" + - ".glslv" + - ".gshader" + - ".shader" + - ".vert" + - ".vrx" + - ".vsh" + - ".vshader" ace_mode: glsl - + language_id: 124 Game Maker Language: type: programming color: "#8fb200" extensions: - - .gml + - ".gml" tm_scope: source.c++ ace_mode: c_cpp - + codemirror_mode: clike + codemirror_mime_type: text/x-c++src + language_id: 125 Genshi: type: programming extensions: - - .kid + - ".kid" tm_scope: text.xml.genshi aliases: - xml+genshi - xml+kid ace_mode: xml - + codemirror_mode: xml + codemirror_mime_type: text/xml + language_id: 126 Gentoo Ebuild: type: programming group: Shell extensions: - - .ebuild + - ".ebuild" tm_scope: source.shell ace_mode: sh - + codemirror_mode: shell + codemirror_mime_type: text/x-sh + language_id: 127 Gentoo Eclass: type: programming group: Shell extensions: - - .eclass + - ".eclass" tm_scope: source.shell ace_mode: sh - + codemirror_mode: shell + codemirror_mime_type: text/x-sh + language_id: 128 Gettext Catalog: type: prose search_term: pot @@ -1303,134 +1426,140 @@ Gettext Catalog: aliases: - pot extensions: - - .po - - .pot + - ".po" + - ".pot" tm_scope: source.po ace_mode: text - + language_id: 129 Glyph: type: programming color: "#e4cc98" extensions: - - .glf + - ".glf" tm_scope: source.tcl ace_mode: tcl - + codemirror_mode: tcl + codemirror_mime_type: text/x-tcl + language_id: 130 Gnuplot: type: programming color: "#f0a9f0" extensions: - - .gp - - .gnu - - .gnuplot - - .plot - - .plt + - ".gp" + - ".gnu" + - ".gnuplot" + - ".plot" + - ".plt" interpreters: - gnuplot ace_mode: text - + language_id: 131 Go: type: programming color: "#375eab" extensions: - - .go + - ".go" ace_mode: golang - + codemirror_mode: go + codemirror_mime_type: text/x-go + language_id: 132 Golo: type: programming color: "#88562A" extensions: - - .golo + - ".golo" tm_scope: source.golo ace_mode: text - + language_id: 133 Gosu: type: programming color: "#82937f" extensions: - - .gs - - .gst - - .gsx - - .vark + - ".gs" + - ".gst" + - ".gsx" + - ".vark" tm_scope: source.gosu.2 ace_mode: text - + language_id: 134 Grace: type: programming extensions: - - .grace + - ".grace" tm_scope: source.grace ace_mode: text - + language_id: 135 Gradle: type: data extensions: - - .gradle + - ".gradle" tm_scope: source.groovy.gradle ace_mode: text - + language_id: 136 Grammatical Framework: type: programming aliases: - gf wrap: false extensions: - - .gf + - ".gf" searchable: true color: "#79aa7a" tm_scope: source.haskell ace_mode: haskell - + codemirror_mode: haskell + codemirror_mime_type: text/x-haskell + language_id: 137 Graph Modeling Language: type: data extensions: - - .gml + - ".gml" tm_scope: none ace_mode: text - + language_id: 138 GraphQL: type: data extensions: - - .graphql + - ".graphql" tm_scope: source.graphql ace_mode: text - + language_id: 139 Graphviz (DOT): type: data tm_scope: source.dot extensions: - - .dot - - .gv + - ".dot" + - ".gv" ace_mode: text - + language_id: 140 Groff: type: markup color: "#ecdebe" extensions: - - .man - - '.1' - - .1in - - .1m - - .1x - - '.2' - - '.3' - - .3in - - .3m - - .3qt - - .3x - - '.4' - - '.5' - - '.6' - - '.7' - - '.8' - - '.9' - - .l - - .me - - .ms - - .n - - .rno - - .roff - - .tmac + - ".man" + - ".1" + - ".1in" + - ".1m" + - ".1x" + - ".2" + - ".3" + - ".3in" + - ".3m" + - ".3qt" + - ".3x" + - ".4" + - ".5" + - ".6" + - ".7" + - ".8" + - ".9" + - ".l" + - ".me" + - ".ms" + - ".n" + - ".rno" + - ".roff" + - ".tmac" filenames: - mmn - mmt @@ -1439,21 +1568,25 @@ Groff: - nroff - troff ace_mode: text - + codemirror_mode: troff + codemirror_mime_type: text/troff + language_id: 141 Groovy: type: programming ace_mode: groovy + codemirror_mode: groovy + codemirror_mime_type: text/x-groovy color: "#e69f56" extensions: - - .groovy - - .grt - - .gtpl - - .gvy + - ".groovy" + - ".grt" + - ".gtpl" + - ".gvy" interpreters: - groovy filenames: - Jenkinsfile - + language_id: 142 Groovy Server Pages: type: programming group: Groovy @@ -1461,58 +1594,66 @@ Groovy Server Pages: - gsp - java server page extensions: - - .gsp + - ".gsp" tm_scope: text.html.jsp ace_mode: jsp - + codemirror_mode: htmlembedded + codemirror_mime_type: application/x-jsp + language_id: 143 HCL: type: programming extensions: - - .hcl - - .tf + - ".hcl" + - ".tf" ace_mode: ruby + codemirror_mode: ruby + codemirror_mime_type: text/x-ruby tm_scope: source.ruby - + language_id: 144 HLSL: type: programming extensions: - - .hlsl - - .fx - - .fxh - - .hlsli + - ".hlsl" + - ".fx" + - ".fxh" + - ".hlsli" ace_mode: text tm_scope: none - + language_id: 145 HTML: type: markup tm_scope: text.html.basic ace_mode: html + codemirror_mode: htmlmixed + codemirror_mime_type: text/html color: "#e44b23" aliases: - xhtml extensions: - - .html - - .htm - - .html.hl - - .inc - - .st - - .xht - - .xhtml - + - ".html" + - ".htm" + - ".html.hl" + - ".inc" + - ".st" + - ".xht" + - ".xhtml" + language_id: 146 HTML+Django: type: markup tm_scope: text.html.django group: HTML extensions: - - .mustache - - .jinja + - ".mustache" + - ".jinja" aliases: - django - html+django/jinja - html+jinja - htmldjango ace_mode: django - + codemirror_mode: django + codemirror_mime_type: text/x-django + language_id: 147 HTML+ECR: type: markup tm_scope: text.html.ecr @@ -1520,9 +1661,11 @@ HTML+ECR: aliases: - ecr extensions: - - .ecr + - ".ecr" ace_mode: text - + codemirror_mode: htmlmixed + codemirror_mime_type: text/html + language_id: 148 HTML+EEX: type: markup tm_scope: text.html.elixir @@ -1530,9 +1673,11 @@ HTML+EEX: aliases: - eex extensions: - - .eex + - ".eex" ace_mode: text - + codemirror_mode: htmlmixed + codemirror_mime_type: text/html + language_id: 149 HTML+ERB: type: markup tm_scope: text.html.erb @@ -1540,131 +1685,147 @@ HTML+ERB: aliases: - erb extensions: - - .erb - - .erb.deface + - ".erb" + - ".erb.deface" ace_mode: text - + codemirror_mode: htmlembedded + codemirror_mime_type: application/x-erb + language_id: 150 HTML+PHP: type: markup tm_scope: text.html.php group: HTML extensions: - - .phtml + - ".phtml" ace_mode: php - + codemirror_mode: php + codemirror_mime_type: application/x-httpd-php + language_id: 151 HTTP: type: data extensions: - - .http + - ".http" tm_scope: source.httpspec ace_mode: text - + codemirror_mode: http + codemirror_mime_type: message/http + language_id: 152 Hack: type: programming ace_mode: php + codemirror_mode: php + codemirror_mime_type: application/x-httpd-php extensions: - - .hh - - .php + - ".hh" + - ".php" tm_scope: text.html.php color: "#878787" - + language_id: 153 Haml: group: HTML type: markup extensions: - - .haml - - .haml.deface + - ".haml" + - ".haml.deface" ace_mode: haml - color: "#ECE2A9" - + codemirror_mode: haml + codemirror_mime_type: text/x-haml + language_id: 154 Handlebars: type: markup - color: "#01a9d6" group: HTML aliases: - hbs - htmlbars extensions: - - .handlebars - - .hbs + - ".handlebars" + - ".hbs" tm_scope: text.html.handlebars ace_mode: handlebars - + language_id: 155 Harbour: type: programming color: "#0e60e3" extensions: - - .hb + - ".hb" tm_scope: source.harbour ace_mode: text - + language_id: 156 Haskell: type: programming color: "#29b544" extensions: - - .hs - - .hsc + - ".hs" + - ".hsc" interpreters: - runhaskell ace_mode: haskell - + codemirror_mode: haskell + codemirror_mime_type: text/x-haskell + language_id: 157 Haxe: type: programming ace_mode: haxe + codemirror_mode: haxe + codemirror_mime_type: text/x-haxe color: "#df7900" extensions: - - .hx - - .hxsl + - ".hx" + - ".hxsl" tm_scope: source.haxe.2 - + language_id: 158 Hy: type: programming ace_mode: text color: "#7790B2" extensions: - - .hy + - ".hy" aliases: - hylang tm_scope: source.hy - + language_id: 159 HyPhy: type: programming ace_mode: text extensions: - - .bf + - ".bf" tm_scope: none - + language_id: 160 IDL: type: programming color: "#a3522f" extensions: - - .pro - - .dlm + - ".pro" + - ".dlm" ace_mode: text - + codemirror_mode: idl + codemirror_mime_type: text/x-idl + language_id: 161 IGOR Pro: type: programming extensions: - - .ipf + - ".ipf" aliases: - igor - igorpro tm_scope: none ace_mode: text - + language_id: 162 INI: type: data extensions: - - .ini - - .cfg - - .prefs - - .pro - - .properties + - ".ini" + - ".cfg" + - ".prefs" + - ".pro" + - ".properties" tm_scope: source.ini aliases: - dosini ace_mode: ini - + codemirror_mode: properties + codemirror_mime_type: text/x-properties + language_id: 163 IRC log: type: data search_term: irc @@ -1672,64 +1833,66 @@ IRC log: - irc - irc logs extensions: - - .irclog - - .weechatlog + - ".irclog" + - ".weechatlog" tm_scope: none ace_mode: text - + codemirror_mode: mirc + codemirror_mime_type: text/mirc + language_id: 164 Idris: type: programming extensions: - - .idr - - .lidr + - ".idr" + - ".lidr" ace_mode: text tm_scope: source.idris - + language_id: 165 Inform 7: type: programming wrap: true extensions: - - .ni - - .i7x + - ".ni" + - ".i7x" tm_scope: source.inform7 aliases: - i7 - inform7 ace_mode: text - + language_id: 166 Inno Setup: type: programming extensions: - - .iss + - ".iss" tm_scope: none ace_mode: text - + language_id: 167 Io: type: programming color: "#a9188d" extensions: - - .io + - ".io" interpreters: - io ace_mode: io - + language_id: 168 Ioke: type: programming color: "#078193" extensions: - - .ik + - ".ik" interpreters: - ioke ace_mode: text - + language_id: 169 Isabelle: type: programming color: "#FEFE00" extensions: - - .thy + - ".thy" tm_scope: source.isabelle.theory ace_mode: text - + language_id: 170 Isabelle ROOT: type: programming group: Isabelle @@ -1737,98 +1900,109 @@ Isabelle ROOT: - ROOT tm_scope: source.isabelle.root ace_mode: text - + language_id: 171 J: type: programming color: "#9EEDFF" extensions: - - .ijs + - ".ijs" interpreters: - jconsole tm_scope: source.j ace_mode: text - + language_id: 172 JFlex: type: programming - color: "#DBCA00" group: Lex extensions: - - .flex - - .jflex + - ".flex" + - ".jflex" tm_scope: source.jflex ace_mode: text - + language_id: 173 JSON: type: data tm_scope: source.json group: JavaScript ace_mode: json + codemirror_mode: javascript + codemirror_mime_type: application/json searchable: false extensions: - - .json - - .geojson - - .JSON-tmLanguage - - .topojson + - ".json" + - ".geojson" + - ".JSON-tmLanguage" + - ".topojson" filenames: - - .arcconfig - - .jshintrc + - ".arcconfig" + - ".jshintrc" - composer.lock - mcmod.info - + language_id: 174 JSON5: type: data extensions: - - .json5 + - ".json5" tm_scope: source.js ace_mode: javascript - + codemirror_mode: javascript + codemirror_mime_type: application/json + language_id: 175 JSONLD: type: data group: JavaScript ace_mode: javascript extensions: - - .jsonld + - ".jsonld" tm_scope: source.js - + language_id: 176 JSONiq: color: "#40d47e" type: programming ace_mode: jsoniq + codemirror_mode: javascript + codemirror_mime_type: application/json extensions: - - .jq + - ".jq" tm_scope: source.jq - + language_id: 177 JSX: type: programming group: JavaScript extensions: - - .jsx + - ".jsx" tm_scope: source.js.jsx ace_mode: javascript - + codemirror_mode: jsx + codemirror_mime_type: text/jsx + language_id: 178 Jade: group: HTML type: markup extensions: - - .jade - - .pug + - ".jade" + - ".pug" tm_scope: text.jade ace_mode: jade - + codemirror_mode: pug + codemirror_mime_type: text/x-pug + language_id: 179 Jasmin: type: programming ace_mode: java extensions: - - .j + - ".j" tm_scope: source.jasmin - + language_id: 180 Java: type: programming ace_mode: java + codemirror_mode: clike + codemirror_mime_type: text/x-java color: "#b07219" extensions: - - .java - + - ".java" + language_id: 181 Java Server Pages: type: programming group: Java @@ -1836,260 +2010,265 @@ Java Server Pages: aliases: - jsp extensions: - - .jsp + - ".jsp" tm_scope: text.html.jsp ace_mode: jsp - + codemirror_mode: htmlembedded + codemirror_mime_type: application/x-jsp + language_id: 182 JavaScript: type: programming tm_scope: source.js ace_mode: javascript + codemirror_mode: javascript + codemirror_mime_type: text/javascript color: "#f1e05a" aliases: - js - node extensions: - - .js - - ._js - - .bones - - .es - - .es6 - - .frag - - .gs - - .jake - - .jsb - - .jscad - - .jsfl - - .jsm - - .jss - - .njs - - .pac - - .sjs - - .ssjs - - .sublime-build - - .sublime-commands - - .sublime-completions - - .sublime-keymap - - .sublime-macro - - .sublime-menu - - .sublime-mousemap - - .sublime-project - - .sublime-settings - - .sublime-theme - - .sublime-workspace - - .sublime_metrics - - .sublime_session - - .xsjs - - .xsjslib + - ".js" + - "._js" + - ".bones" + - ".es" + - ".es6" + - ".frag" + - ".gs" + - ".jake" + - ".jsb" + - ".jscad" + - ".jsfl" + - ".jsm" + - ".jss" + - ".njs" + - ".pac" + - ".sjs" + - ".ssjs" + - ".xsjs" + - ".xsjslib" filenames: - Jakefile interpreters: - node - + language_id: 183 Julia: type: programming extensions: - - .jl + - ".jl" + interpreters: + - julia color: "#a270ba" ace_mode: julia - + codemirror_mode: julia + codemirror_mime_type: text/x-julia + language_id: 184 Jupyter Notebook: type: markup ace_mode: json + codemirror_mode: javascript + codemirror_mime_type: application/json tm_scope: source.json color: "#DA5B0B" extensions: - - .ipynb + - ".ipynb" filenames: - Notebook aliases: - IPython Notebook - + language_id: 185 KRL: type: programming color: "#28431f" extensions: - - .krl + - ".krl" tm_scope: none ace_mode: text - + language_id: 186 KiCad: type: programming extensions: - - .sch - - .brd - - .kicad_pcb + - ".sch" + - ".brd" + - ".kicad_pcb" tm_scope: none ace_mode: text - + language_id: 187 Kit: type: markup ace_mode: html + codemirror_mode: htmlmixed + codemirror_mime_type: text/html extensions: - - .kit + - ".kit" tm_scope: text.html.basic - + language_id: 188 Kotlin: type: programming color: "#F18E33" extensions: - - .kt - - .ktm - - .kts + - ".kt" + - ".ktm" + - ".kts" tm_scope: source.Kotlin ace_mode: text - + codemirror_mode: clike + codemirror_mime_type: text/x-kotlin + language_id: 189 LFE: type: programming extensions: - - .lfe - color: "#004200" + - ".lfe" group: Erlang tm_scope: source.lisp ace_mode: lisp - + codemirror_mode: commonlisp + codemirror_mime_type: text/x-common-lisp + language_id: 190 LLVM: type: programming extensions: - - .ll + - ".ll" ace_mode: text color: "#185619" - + language_id: 191 LOLCODE: type: programming extensions: - - .lol + - ".lol" color: "#cc9900" tm_scope: none ace_mode: text - + language_id: 192 LSL: type: programming ace_mode: lsl extensions: - - .lsl - - .lslp + - ".lsl" + - ".lslp" interpreters: - lsl - color: '#3d9970' - + color: "#3d9970" + language_id: 193 LabVIEW: type: programming extensions: - - .lvproj + - ".lvproj" tm_scope: text.xml ace_mode: xml - + codemirror_mode: xml + codemirror_mime_type: text/xml + language_id: 194 Lasso: type: programming color: "#999999" extensions: - - .lasso - - .las - - .lasso8 - - .lasso9 - - .ldml + - ".lasso" + - ".las" + - ".lasso8" + - ".lasso9" + - ".ldml" tm_scope: file.lasso aliases: - lassoscript ace_mode: text - + language_id: 195 Latte: type: markup - color: "#A8FF97" group: HTML extensions: - - .latte + - ".latte" tm_scope: text.html.smarty ace_mode: smarty - + codemirror_mode: smarty + codemirror_mime_type: text/x-smarty + language_id: 196 Lean: type: programming extensions: - - .lean - - .hlean + - ".lean" + - ".hlean" ace_mode: text - + language_id: 197 Less: type: markup group: CSS extensions: - - .less + - ".less" tm_scope: source.css.less ace_mode: less - color: "#A1D9A1" - + codemirror_mode: css + codemirror_mime_type: text/css + language_id: 198 Lex: type: programming color: "#DBCA00" aliases: - flex extensions: - - .l - - .lex + - ".l" + - ".lex" tm_scope: none ace_mode: text - + language_id: 199 LilyPond: type: programming extensions: - - .ly - - .ily + - ".ly" + - ".ily" ace_mode: text - + language_id: 200 Limbo: type: programming extensions: - - .b - - .m + - ".b" + - ".m" tm_scope: none ace_mode: text - + language_id: 201 Linker Script: type: data extensions: - - .ld - - .lds + - ".ld" + - ".lds" filenames: - ld.script tm_scope: none ace_mode: text - + language_id: 202 Linux Kernel Module: type: data extensions: - - .mod + - ".mod" tm_scope: none ace_mode: text - + language_id: 203 Liquid: type: markup extensions: - - .liquid + - ".liquid" tm_scope: text.html.liquid ace_mode: liquid - + language_id: 204 Literate Agda: type: programming group: Agda extensions: - - .lagda + - ".lagda" tm_scope: none ace_mode: text - + language_id: 205 Literate CoffeeScript: type: programming tm_scope: source.litcoffee group: CoffeeScript - ace_mode: markdown + ace_mode: text wrap: true search_term: litcoffee aliases: - litcoffee extensions: - - .litcoffee - ace_mode: text - + - ".litcoffee" + language_id: 206 Literate Haskell: type: programming group: Haskell @@ -2098,10 +2277,12 @@ Literate Haskell: - lhaskell - lhs extensions: - - .lhs + - ".lhs" tm_scope: text.tex.latex.haskell ace_mode: text - + codemirror_mode: haskell-literate + codemirror_mime_type: text/x-literate-haskell + language_id: 207 LiveScript: type: programming color: "#499886" @@ -2109,112 +2290,142 @@ LiveScript: - live-script - ls extensions: - - .ls - - ._ls + - ".ls" + - "._ls" filenames: - Slakefile ace_mode: livescript - + codemirror_mode: livescript + codemirror_mime_type: text/x-livescript + language_id: 208 Logos: type: programming extensions: - - .xm - - .x - - .xi + - ".xm" + - ".x" + - ".xi" ace_mode: text tm_scope: source.logos - + language_id: 209 Logtalk: type: programming extensions: - - .lgt - - .logtalk + - ".lgt" + - ".logtalk" ace_mode: text - + language_id: 210 LookML: type: programming ace_mode: yaml + codemirror_mode: yaml + codemirror_mime_type: text/x-yaml color: "#652B81" extensions: - - .lookml + - ".lookml" tm_scope: source.yaml - + language_id: 211 LoomScript: type: programming extensions: - - .ls + - ".ls" tm_scope: source.loomscript ace_mode: text - + language_id: 212 Lua: type: programming ace_mode: lua + codemirror_mode: lua + codemirror_mime_type: text/x-lua color: "#000080" extensions: - - .lua - - .fcgi - - .nse - - .pd_lua - - .rbxs - - .wlua + - ".lua" + - ".fcgi" + - ".nse" + - ".pd_lua" + - ".rbxs" + - ".wlua" interpreters: - lua - + language_id: 213 M: type: programming aliases: - mumps extensions: - - .mumps - - .m - tm_scope: source.lisp - ace_mode: lisp - + - ".mumps" + - ".m" + ace_mode: text + codemirror_mode: mumps + codemirror_mime_type: text/x-mumps + language_id: 214 + tm_scope: none M4: type: programming extensions: - - .m4 + - ".m4" tm_scope: none ace_mode: text - + language_id: 215 M4Sugar: type: programming group: M4 aliases: - autoconf extensions: - - .m4 + - ".m4" filenames: - configure.ac tm_scope: none ace_mode: text - + language_id: 216 MAXScript: type: programming color: "#00a6a6" extensions: - - .ms - - .mcr + - ".ms" + - ".mcr" tm_scope: source.maxscript ace_mode: text - + language_id: 217 +MQL4: + type: programming + color: "#62A8D6" + extensions: + - ".mq4" + - ".mqh" + tm_scope: source.mql5 + ace_mode: c_cpp + language_id: 426 +MQL5: + type: programming + color: "#4A76B8" + extensions: + - ".mq5" + - ".mqh" + tm_scope: source.mql5 + ace_mode: c_cpp + language_id: 427 MTML: type: markup color: "#b7e1f4" extensions: - - .mtml + - ".mtml" tm_scope: text.html.basic ace_mode: html - + codemirror_mode: htmlmixed + codemirror_mime_type: text/html + language_id: 218 MUF: type: programming group: Forth extensions: - - .muf - - .m + - ".muf" + - ".m" tm_scope: none ace_mode: forth - + codemirror_mode: forth + codemirror_mime_type: text/x-forth + language_id: 219 Makefile: type: programming color: "#427819" @@ -2223,16 +2434,18 @@ Makefile: - make - mf extensions: - - .mak - - .d - - .mk - - .mkfile + - ".mak" + - ".d" + - ".make" + - ".mk" + - ".mkfile" filenames: - BSDmakefile - GNUmakefile - Kbuild - Makefile - Makefile.am + - Makefile.boot - Makefile.frag - Makefile.in - Makefile.inc @@ -2242,69 +2455,79 @@ Makefile: interpreters: - make ace_mode: makefile - + codemirror_mode: cmake + codemirror_mime_type: text/x-cmake + language_id: 220 Mako: type: programming extensions: - - .mako - - .mao + - ".mako" + - ".mao" tm_scope: text.html.mako ace_mode: text - + language_id: 221 Markdown: type: prose ace_mode: markdown + codemirror_mode: gfm + codemirror_mime_type: text/x-gfm wrap: true extensions: - - .md - - .markdown - - .mkd - - .mkdn - - .mkdown - - .ron + - ".md" + - ".markdown" + - ".mkd" + - ".mkdn" + - ".mkdown" + - ".ron" tm_scope: source.gfm - + language_id: 222 Mask: type: markup color: "#f97732" ace_mode: mask extensions: - - .mask + - ".mask" tm_scope: source.mask - + language_id: 223 Mathematica: type: programming extensions: - - .mathematica - - .cdf - - .m - - .ma - - .mt - - .nb - - .nbp - - .wl - - .wlt + - ".mathematica" + - ".cdf" + - ".m" + - ".ma" + - ".mt" + - ".nb" + - ".nbp" + - ".wl" + - ".wlt" aliases: - mma ace_mode: text - + codemirror_mode: mathematica + codemirror_mime_type: text/x-mathematica + language_id: 224 Matlab: type: programming color: "#bb92ac" aliases: - octave extensions: - - .matlab - - .m + - ".matlab" + - ".m" ace_mode: matlab - + codemirror_mode: octave + codemirror_mime_type: text/x-octave + language_id: 225 Maven POM: type: data tm_scope: text.xml.pom filenames: - pom.xml ace_mode: xml - + codemirror_mode: xml + codemirror_mime_type: text/xml + language_id: 226 Max: type: programming color: "#c4a79c" @@ -2313,23 +2536,25 @@ Max: - maxmsp search_term: max/msp extensions: - - .maxpat - - .maxhelp - - .maxproj - - .mxt - - .pat + - ".maxpat" + - ".maxhelp" + - ".maxproj" + - ".mxt" + - ".pat" tm_scope: source.json ace_mode: json - + codemirror_mode: javascript + codemirror_mime_type: application/json + language_id: 227 MediaWiki: type: prose wrap: true extensions: - - .mediawiki - - .wiki + - ".mediawiki" + - ".wiki" tm_scope: text.html.mediawiki ace_mode: text - + language_id: 228 Mercury: type: programming color: "#ff2b2b" @@ -2337,258 +2562,276 @@ Mercury: interpreters: - mmi extensions: - - .m - - .moo + - ".m" + - ".moo" tm_scope: source.mercury - ace_mode: prolog - + language_id: 229 Metal: type: programming color: "#8f14e9" extensions: - - .metal + - ".metal" tm_scope: source.c++ ace_mode: c_cpp - -MiniD: # Legacy + codemirror_mode: clike + codemirror_mime_type: text/x-c++src + language_id: 230 +MiniD: type: programming searchable: false extensions: - - .minid # Dummy extension + - ".minid" tm_scope: none ace_mode: text - + language_id: 231 Mirah: type: programming search_term: mirah color: "#c7a938" extensions: - - .druby - - .duby - - .mir - - .mirah + - ".druby" + - ".duby" + - ".mir" + - ".mirah" tm_scope: source.ruby ace_mode: ruby - + codemirror_mode: ruby + codemirror_mime_type: text/x-ruby + language_id: 232 Modelica: type: programming extensions: - - .mo + - ".mo" tm_scope: source.modelica ace_mode: text - + codemirror_mode: modelica + codemirror_mime_type: text/x-modelica + language_id: 233 Modula-2: type: programming extensions: - - .mod + - ".mod" tm_scope: source.modula2 ace_mode: text - + language_id: 234 Module Management System: type: programming extensions: - - .mms - - .mmk + - ".mms" + - ".mmk" filenames: - descrip.mmk - descrip.mms tm_scope: none ace_mode: text - + language_id: 235 Monkey: type: programming extensions: - - .monkey + - ".monkey" ace_mode: text tm_scope: source.monkey - + language_id: 236 Moocode: type: programming extensions: - - .moo + - ".moo" tm_scope: none ace_mode: text - + language_id: 237 MoonScript: type: programming extensions: - - .moon + - ".moon" interpreters: - moon ace_mode: text - + language_id: 238 Myghty: type: programming extensions: - - .myt + - ".myt" tm_scope: none ace_mode: text - + language_id: 239 NCL: type: programming color: "#28431f" extensions: - - .ncl + - ".ncl" tm_scope: source.ncl ace_mode: text - + language_id: 240 NL: type: data extensions: - - .nl + - ".nl" tm_scope: none ace_mode: text - + language_id: 241 NSIS: type: programming extensions: - - .nsi - - .nsh + - ".nsi" + - ".nsh" ace_mode: text - + codemirror_mode: nsis + codemirror_mime_type: text/x-nsis + language_id: 242 Nemerle: type: programming color: "#3d3c6e" extensions: - - .n + - ".n" ace_mode: text - + language_id: 243 NetLinx: type: programming color: "#0aa0ff" extensions: - - .axs - - .axi + - ".axs" + - ".axi" tm_scope: source.netlinx ace_mode: text - + language_id: 244 NetLinx+ERB: type: programming color: "#747faa" extensions: - - .axs.erb - - .axi.erb + - ".axs.erb" + - ".axi.erb" tm_scope: source.netlinx.erb ace_mode: text - + language_id: 245 NetLogo: type: programming color: "#ff6375" extensions: - - .nlogo + - ".nlogo" tm_scope: source.lisp ace_mode: lisp - + codemirror_mode: commonlisp + codemirror_mime_type: text/x-common-lisp + language_id: 246 NewLisp: type: programming lexer: NewLisp color: "#87AED7" extensions: - - .nl - - .lisp - - .lsp + - ".nl" + - ".lisp" + - ".lsp" interpreters: - newlisp tm_scope: source.lisp ace_mode: lisp - + codemirror_mode: commonlisp + codemirror_mime_type: text/x-common-lisp + language_id: 247 Nginx: type: markup extensions: - - .nginxconf - - .vhost + - ".nginxconf" + - ".vhost" filenames: - nginx.conf tm_scope: source.nginx aliases: - nginx configuration file ace_mode: text + codemirror_mode: nginx + codemirror_mime_type: text/x-nginx-conf color: "#9469E9" - + language_id: 248 Nimrod: type: programming color: "#37775b" extensions: - - .nim - - .nimrod + - ".nim" + - ".nimrod" ace_mode: text tm_scope: source.nim - + language_id: 249 Ninja: type: data tm_scope: source.ninja extensions: - - .ninja + - ".ninja" ace_mode: text - + language_id: 250 Nit: type: programming color: "#009917" extensions: - - .nit + - ".nit" tm_scope: source.nit ace_mode: text - + language_id: 251 Nix: type: programming color: "#7e7eff" extensions: - - .nix + - ".nix" aliases: - nixos tm_scope: source.nix ace_mode: nix - + language_id: 252 Nu: type: programming color: "#c9df40" aliases: - nush extensions: - - .nu + - ".nu" filenames: - Nukefile tm_scope: source.nu ace_mode: scheme + codemirror_mode: scheme + codemirror_mime_type: text/x-scheme interpreters: - nush - + language_id: 253 NumPy: type: programming group: Python extensions: - - .numpy - - .numpyw - - .numsc + - ".numpy" + - ".numpyw" + - ".numsc" tm_scope: none ace_mode: text - color: "#9C8AF9" - + codemirror_mode: python + codemirror_mime_type: text/x-python + language_id: 254 OCaml: type: programming ace_mode: ocaml + codemirror_mode: mllike + codemirror_mime_type: text/x-ocaml color: "#3be133" extensions: - - .ml - - .eliom - - .eliomi - - .ml4 - - .mli - - .mll - - .mly + - ".ml" + - ".eliom" + - ".eliomi" + - ".ml4" + - ".mli" + - ".mll" + - ".mly" interpreters: - ocaml - ocamlrun - ocamlscript tm_scope: source.ocaml - + language_id: 255 ObjDump: type: data extensions: - - .objdump + - ".objdump" tm_scope: objdump.x86asm ace_mode: assembly_x86 - + language_id: 256 Objective-C: type: programming tm_scope: source.objc @@ -2598,10 +2841,12 @@ Objective-C: - objc - objectivec extensions: - - .m - - .h + - ".m" + - ".h" ace_mode: objectivec - + codemirror_mode: clike + codemirror_mime_type: text/x-objectivec + language_id: 257 Objective-C++: type: programming tm_scope: source.objc++ @@ -2611,9 +2856,11 @@ Objective-C++: - objc++ - objectivec++ extensions: - - .mm + - ".mm" ace_mode: objectivec - + codemirror_mode: clike + codemirror_mime_type: text/x-objectivec + language_id: 258 Objective-J: type: programming color: "#ff0c5a" @@ -2622,42 +2869,44 @@ Objective-J: - objectivej - objj extensions: - - .j - - .sj + - ".j" + - ".sj" tm_scope: source.js.objj ace_mode: text - + language_id: 259 Omgrofl: type: programming extensions: - - .omgrofl + - ".omgrofl" color: "#cabbff" tm_scope: none ace_mode: text - + language_id: 260 Opa: type: programming extensions: - - .opa + - ".opa" ace_mode: text - + language_id: 261 Opal: type: programming color: "#f7ede0" extensions: - - .opal + - ".opal" tm_scope: source.opal ace_mode: text - + language_id: 262 OpenCL: type: programming group: C extensions: - - .cl - - .opencl + - ".cl" + - ".opencl" tm_scope: source.c ace_mode: c_cpp - + codemirror_mode: clike + codemirror_mime_type: text/x-csrc + language_id: 263 OpenEdge ABL: type: programming aliases: @@ -2665,11 +2914,11 @@ OpenEdge ABL: - openedge - abl extensions: - - .p - - .cls + - ".p" + - ".cls" tm_scope: source.abl ace_mode: text - + language_id: 264 OpenRC runscript: type: programming group: Shell @@ -2679,148 +2928,156 @@ OpenRC runscript: - openrc-run tm_scope: source.shell ace_mode: sh - + codemirror_mode: shell + codemirror_mime_type: text/x-sh + language_id: 265 OpenSCAD: type: programming extensions: - - .scad + - ".scad" tm_scope: none ace_mode: scad - + language_id: 266 Org: type: prose wrap: true extensions: - - .org + - ".org" tm_scope: none ace_mode: text - + language_id: 267 Ox: type: programming extensions: - - .ox - - .oxh - - .oxo + - ".ox" + - ".oxh" + - ".oxo" tm_scope: source.ox ace_mode: text - + language_id: 268 Oxygene: type: programming color: "#cdd0e3" extensions: - - .oxygene + - ".oxygene" tm_scope: none ace_mode: text - + language_id: 269 Oz: type: programming color: "#fab738" extensions: - - .oz + - ".oz" tm_scope: source.oz ace_mode: text - + codemirror_mode: oz + codemirror_mime_type: text/x-oz + language_id: 270 PAWN: type: programming color: "#dbb284" extensions: - - .pwn - - .inc + - ".pwn" + - ".inc" tm_scope: source.pawn ace_mode: text - + language_id: 271 PHP: type: programming tm_scope: text.html.php ace_mode: php + codemirror_mode: php + codemirror_mime_type: application/x-httpd-php color: "#4F5D95" extensions: - - .php - - .aw - - .ctp - - .fcgi - - .inc - - .php3 - - .php4 - - .php5 - - .phps - - .phpt + - ".php" + - ".aw" + - ".ctp" + - ".fcgi" + - ".inc" + - ".php3" + - ".php4" + - ".php5" + - ".phps" + - ".phpt" filenames: - Phakefile interpreters: - php aliases: - inc - -#Oracle + language_id: 272 PLSQL: type: programming ace_mode: sql + codemirror_mode: sql + codemirror_mime_type: text/x-plsql tm_scope: none color: "#dad8d8" extensions: - - .pls - - .pck - - .pkb - - .pks - - .plb - - .plsql - - .sql - -#Postgres + - ".pls" + - ".pck" + - ".pkb" + - ".pks" + - ".plb" + - ".plsql" + - ".sql" + language_id: 273 PLpgSQL: type: programming ace_mode: pgsql + codemirror_mode: sql + codemirror_mime_type: text/x-sql tm_scope: source.sql extensions: - - .sql - + - ".sql" + language_id: 274 POV-Ray SDL: type: programming aliases: - pov-ray - povray extensions: - - .pov - - .inc + - ".pov" + - ".inc" ace_mode: text - + language_id: 275 Pan: type: programming - color: '#cc0000' + color: "#cc0000" extensions: - - .pan + - ".pan" tm_scope: none ace_mode: text - + language_id: 276 Papyrus: type: programming color: "#6600cc" extensions: - - .psc + - ".psc" tm_scope: source.papyrus.skyrim ace_mode: text - + language_id: 277 Parrot: type: programming color: "#f3ca0a" extensions: - - .parrot # Dummy extension + - ".parrot" tm_scope: none ace_mode: text - + language_id: 278 Parrot Assembly: group: Parrot type: programming aliases: - pasm extensions: - - .pasm + - ".pasm" interpreters: - parrot tm_scope: none ace_mode: text - + language_id: 279 Parrot Internal Representation: group: Parrot tm_scope: source.parrot.pir @@ -2828,259 +3085,291 @@ Parrot Internal Representation: aliases: - pir extensions: - - .pir + - ".pir" interpreters: - parrot ace_mode: text - + language_id: 280 Pascal: type: programming color: "#E3F171" extensions: - - .pas - - .dfm - - .dpr - - .inc - - .lpr - - .pascal - - .pp + - ".pas" + - ".dfm" + - ".dpr" + - ".inc" + - ".lpr" + - ".pascal" + - ".pp" interpreters: - instantfpc ace_mode: pascal - + codemirror_mode: pascal + codemirror_mime_type: text/x-pascal + language_id: 281 Perl: type: programming tm_scope: source.perl ace_mode: perl + codemirror_mode: perl + codemirror_mime_type: text/x-perl color: "#0298c3" extensions: - - .pl - - .al - - .cgi - - .fcgi - - .perl - - .ph - - .plx - - .pm - - .pod - - .psgi - - .t + - ".pl" + - ".al" + - ".cgi" + - ".fcgi" + - ".perl" + - ".ph" + - ".plx" + - ".pm" + - ".pod" + - ".psgi" + - ".t" interpreters: - perl - + language_id: 282 Perl6: type: programming color: "#0000fb" extensions: - - .6pl - - .6pm - - .nqp - - .p6 - - .p6l - - .p6m - - .pl - - .pl6 - - .pm - - .pm6 - - .t + - ".6pl" + - ".6pm" + - ".nqp" + - ".p6" + - ".p6l" + - ".p6m" + - ".pl" + - ".pl6" + - ".pm" + - ".pm6" + - ".t" filenames: - Rexfile interpreters: - perl6 tm_scope: source.perl6fe ace_mode: perl - + codemirror_mode: perl + codemirror_mime_type: text/x-perl + language_id: 283 +Pic: + type: markup + group: Groff + tm_scope: "source.pic" + extensions: + - ".pic" + - ".chem" + ace_mode: text + codemirror_mode: troff + codemirror_mime_type: text/troff + language_id: 425 Pickle: type: data extensions: - - .pkl + - ".pkl" tm_scope: none ace_mode: text - + language_id: 284 PicoLisp: type: programming extensions: - - .l + - ".l" interpreters: - picolisp - pil tm_scope: source.lisp ace_mode: lisp - + language_id: 285 PigLatin: type: programming color: "#fcd7de" extensions: - - .pig + - ".pig" tm_scope: source.pig_latin ace_mode: text - + language_id: 286 Pike: type: programming color: "#005390" extensions: - - .pike - - .pmod + - ".pike" + - ".pmod" interpreters: - pike ace_mode: text - + language_id: 287 Pod: type: prose ace_mode: perl + codemirror_mode: perl + codemirror_mime_type: text/x-perl wrap: true extensions: - - .pod + - ".pod" tm_scope: none - + language_id: 288 PogoScript: type: programming color: "#d80074" extensions: - - .pogo + - ".pogo" tm_scope: source.pogoscript ace_mode: text - + language_id: 289 Pony: type: programming extensions: - - .pony + - ".pony" tm_scope: source.pony ace_mode: text - + language_id: 290 PostScript: type: markup color: "#da291c" extensions: - - .ps - - .eps + - ".ps" + - ".eps" tm_scope: source.postscript aliases: - postscr ace_mode: text - + language_id: 291 PowerBuilder: type: programming color: "#8f0f8d" extensions: - - .pbt - - .sra - - .sru - - .srw + - ".pbt" + - ".sra" + - ".sru" + - ".srw" tm_scope: none ace_mode: text - + language_id: 292 PowerShell: type: programming ace_mode: powershell + codemirror_mode: powershell + codemirror_mime_type: application/x-powershell aliases: - posh extensions: - - .ps1 - - .psd1 - - .psm1 - + - ".ps1" + - ".psd1" + - ".psm1" + language_id: 293 Processing: type: programming color: "#0096D8" extensions: - - .pde + - ".pde" ace_mode: text - + language_id: 294 Prolog: type: programming color: "#74283c" extensions: - - .pl - - .pro - - .prolog - - .yap + - ".pl" + - ".pro" + - ".prolog" + - ".yap" interpreters: - swipl - yap tm_scope: source.prolog ace_mode: prolog - + language_id: 295 Propeller Spin: type: programming color: "#7fa2a7" extensions: - - .spin + - ".spin" tm_scope: source.spin ace_mode: text - + language_id: 296 Protocol Buffer: type: markup aliases: - protobuf - Protocol Buffers extensions: - - .proto + - ".proto" tm_scope: source.protobuf ace_mode: protobuf - + codemirror_mode: protobuf + codemirror_mime_type: text/x-protobuf + language_id: 297 Public Key: type: data extensions: - - .asc - - .pub + - ".asc" + - ".pub" tm_scope: none ace_mode: text - + codemirror_mode: asciiarmor + codemirror_mime_type: application/pgp + language_id: 298 Puppet: type: programming color: "#302B6D" extensions: - - .pp + - ".pp" filenames: - Modulefile ace_mode: text + codemirror_mode: puppet + codemirror_mime_type: text/x-puppet tm_scope: source.puppet - + language_id: 299 Pure Data: type: programming color: "#91de79" extensions: - - .pd + - ".pd" tm_scope: none ace_mode: text - + language_id: 300 PureBasic: type: programming color: "#5a6986" extensions: - - .pb - - .pbi + - ".pb" + - ".pbi" tm_scope: none ace_mode: text - + language_id: 301 PureScript: type: programming color: "#1D222D" extensions: - - .purs + - ".purs" tm_scope: source.purescript ace_mode: haskell - + codemirror_mode: haskell + codemirror_mime_type: text/x-haskell + language_id: 302 Python: type: programming ace_mode: python + codemirror_mode: python + codemirror_mime_type: text/x-python color: "#3572A5" extensions: - - .py - - .bzl - - .cgi - - .fcgi - - .gyp - - .lmi - - .pyde - - .pyp - - .pyt - - .pyw - - .rpy - - .tac - - .wsgi - - .xpy + - ".py" + - ".bzl" + - ".cgi" + - ".fcgi" + - ".gyp" + - ".lmi" + - ".pyde" + - ".pyp" + - ".pyt" + - ".pyw" + - ".rpy" + - ".spec" + - ".tac" + - ".wsgi" + - ".xpy" filenames: - BUCK - BUILD @@ -3094,34 +3383,34 @@ Python: - python3 aliases: - rusthon - + language_id: 303 Python traceback: type: data group: Python searchable: false extensions: - - .pytb + - ".pytb" tm_scope: text.python.traceback ace_mode: text - + language_id: 304 QML: type: programming color: "#44a51c" extensions: - - .qml - - .qbs + - ".qml" + - ".qbs" tm_scope: source.qml ace_mode: text - + language_id: 305 QMake: type: programming extensions: - - .pro - - .pri + - ".pro" + - ".pri" interpreters: - qmake ace_mode: text - + language_id: 306 R: type: programming color: "#198CE7" @@ -3130,182 +3419,207 @@ R: - Rscript - splus extensions: - - .r - - .rd - - .rsx + - ".r" + - ".rd" + - ".rsx" filenames: - - .Rprofile + - ".Rprofile" interpreters: - Rscript ace_mode: r - + codemirror_mode: r + codemirror_mime_type: text/x-rsrc + language_id: 307 RAML: type: markup ace_mode: yaml + codemirror_mode: yaml + codemirror_mime_type: text/x-yaml tm_scope: source.yaml color: "#77d9fb" extensions: - - .raml - + - ".raml" + language_id: 308 RDoc: type: prose ace_mode: rdoc wrap: true extensions: - - .rdoc + - ".rdoc" tm_scope: text.rdoc - + language_id: 309 REALbasic: type: programming extensions: - - .rbbas - - .rbfrm - - .rbmnu - - .rbres - - .rbtbar - - .rbuistate + - ".rbbas" + - ".rbfrm" + - ".rbmnu" + - ".rbres" + - ".rbtbar" + - ".rbuistate" tm_scope: source.vbnet ace_mode: text - + language_id: 310 REXX: type: programming aliases: - arexx extensions: - - .rexx - - .pprx - - .rex + - ".rexx" + - ".pprx" + - ".rex" + interpreters: + - regina + - rexx tm_scope: source.rexx ace_mode: text - + language_id: 311 RHTML: type: markup group: HTML extensions: - - .rhtml + - ".rhtml" tm_scope: text.html.erb aliases: - html+ruby ace_mode: rhtml - + codemirror_mode: htmlembedded + codemirror_mime_type: application/x-erb + language_id: 312 RMarkdown: type: prose wrap: true ace_mode: markdown + codemirror_mode: gfm + codemirror_mime_type: text/x-gfm extensions: - - .rmd + - ".rmd" tm_scope: source.gfm - + language_id: 313 +RPM Spec: + type: data + tm_scope: source.rpm-spec + extensions: + - ".spec" + aliases: + - specfile + ace_mode: text + codemirror_mode: rpm + codemirror_mime_type: text/x-rpm-spec + language_id: 314 RUNOFF: type: markup color: "#665a4e" extensions: - - .rnh - - .rno + - ".rnh" + - ".rno" tm_scope: text.runoff ace_mode: text - + language_id: 315 Racket: type: programming color: "#22228f" extensions: - - .rkt - - .rktd - - .rktl - - .scrbl + - ".rkt" + - ".rktd" + - ".rktl" + - ".scrbl" interpreters: - racket tm_scope: source.racket ace_mode: lisp - + language_id: 316 Ragel in Ruby Host: type: programming color: "#9d5200" extensions: - - .rl + - ".rl" aliases: - ragel-rb - ragel-ruby tm_scope: none ace_mode: text - + language_id: 317 Raw token data: type: data search_term: raw aliases: - raw extensions: - - .raw + - ".raw" tm_scope: none ace_mode: text - + language_id: 318 Rebol: type: programming color: "#358a5b" extensions: - - .reb - - .r - - .r2 - - .r3 - - .rebol + - ".reb" + - ".r" + - ".r2" + - ".r3" + - ".rebol" ace_mode: text tm_scope: source.rebol - + language_id: 319 Red: type: programming color: "#f50000" extensions: - - .red - - .reds + - ".red" + - ".reds" aliases: - red/system tm_scope: source.red ace_mode: text - + language_id: 320 Redcode: type: programming extensions: - - .cw + - ".cw" tm_scope: none ace_mode: text - + language_id: 321 Ren'Py: type: programming aliases: - renpy color: "#ff7f7f" extensions: - - .rpy + - ".rpy" tm_scope: source.renpy ace_mode: python - + language_id: 322 RenderScript: type: programming extensions: - - .rs - - .rsh + - ".rs" + - ".rsh" tm_scope: none ace_mode: text - + language_id: 323 RobotFramework: type: programming extensions: - - .robot - # - .txt + - ".robot" tm_scope: text.robot ace_mode: text - + language_id: 324 Rouge: type: programming ace_mode: clojure + codemirror_mode: clojure + codemirror_mime_type: text/x-clojure color: "#cc0088" extensions: - - .rg + - ".rg" tm_scope: source.clojure - + language_id: 325 Ruby: type: programming ace_mode: ruby + codemirror_mode: ruby + codemirror_mime_type: text/x-ruby color: "#701516" aliases: - jruby @@ -3314,25 +3628,26 @@ Ruby: - rb - rbx extensions: - - .rb - - .builder - - .fcgi - - .gemspec - - .god - - .irbrc - - .jbuilder - - .mspec - - .pluginspec - - .podspec - - .rabl - - .rake - - .rbuild - - .rbw - - .rbx - - .ru - - .ruby - - .thor - - .watchr + - ".rb" + - ".builder" + - ".fcgi" + - ".gemspec" + - ".god" + - ".irbrc" + - ".jbuilder" + - ".mspec" + - ".pluginspec" + - ".podspec" + - ".rabl" + - ".rake" + - ".rbuild" + - ".rbw" + - ".rbx" + - ".ru" + - ".ruby" + - ".spec" + - ".thor" + - ".watchr" interpreters: - ruby - macruby @@ -3340,7 +3655,7 @@ Ruby: - jruby - rbx filenames: - - .pryrc + - ".pryrc" - Appraisals - Berksfile - Brewfile @@ -3358,37 +3673,42 @@ Ruby: - Thorfile - Vagrantfile - buildfile - + language_id: 326 Rust: type: programming color: "#dea584" extensions: - - .rs - - .rs.in + - ".rs" + - ".rs.in" ace_mode: rust - + codemirror_mode: rust + codemirror_mime_type: text/x-rustsrc + language_id: 327 SAS: type: programming color: "#B34936" extensions: - - .sas + - ".sas" tm_scope: source.sas ace_mode: text - + codemirror_mode: sas + codemirror_mime_type: text/x-sas + language_id: 328 SCSS: type: markup tm_scope: source.scss group: CSS ace_mode: scss + codemirror_mode: css + codemirror_mime_type: text/x-scss extensions: - - .scss - color: "#CF649A" - + - ".scss" + language_id: 329 SMT: type: programming extensions: - - .smt2 - - .smt + - ".smt2" + - ".smt" interpreters: - boolector - cvc4 @@ -3402,79 +3722,90 @@ SMT: - z3 tm_scope: source.smt ace_mode: text - + language_id: 330 SPARQL: type: data tm_scope: source.sparql ace_mode: text + codemirror_mode: sparql + codemirror_mime_type: application/sparql-query extensions: - - .sparql - - .rq - + - ".sparql" + - ".rq" + language_id: 331 SQF: type: programming color: "#3F3F3F" extensions: - - .sqf - - .hqf + - ".sqf" + - ".hqf" tm_scope: source.sqf ace_mode: text - + language_id: 332 SQL: type: data tm_scope: source.sql ace_mode: sql + codemirror_mode: sql + codemirror_mime_type: text/x-sql extensions: - - .sql - - .cql - - .ddl - - .inc - - .prc - - .tab - - .udf - - .viw - -#IBM DB2 + - ".sql" + - ".cql" + - ".ddl" + - ".inc" + - ".prc" + - ".tab" + - ".udf" + - ".viw" + language_id: 333 SQLPL: type: programming ace_mode: sql + codemirror_mode: sql + codemirror_mime_type: text/x-sql tm_scope: source.sql extensions: - - .sql - - .db2 - + - ".sql" + - ".db2" + language_id: 334 SRecode Template: type: markup color: "#348a34" tm_scope: source.lisp ace_mode: lisp + codemirror_mode: commonlisp + codemirror_mime_type: text/x-common-lisp extensions: - - .srt - + - ".srt" + language_id: 335 STON: type: data group: Smalltalk extensions: - - .ston + - ".ston" tm_scope: source.smalltalk ace_mode: text - + language_id: 336 SVG: type: data extensions: - - .svg + - ".svg" tm_scope: text.xml ace_mode: xml - + codemirror_mode: xml + codemirror_mime_type: text/xml + language_id: 337 Sage: type: programming group: Python extensions: - - .sage - - .sagews + - ".sage" + - ".sagews" tm_scope: source.python ace_mode: python - + codemirror_mode: python + codemirror_mime_type: text/x-python + language_id: 338 SaltStack: type: programming color: "#646464" @@ -3482,47 +3813,52 @@ SaltStack: - saltstate - salt extensions: - - .sls + - ".sls" tm_scope: source.yaml.salt ace_mode: yaml - + codemirror_mode: yaml + codemirror_mime_type: text/x-yaml + language_id: 339 Sass: type: markup tm_scope: source.sass group: CSS extensions: - - .sass + - ".sass" ace_mode: sass - color: "#CF649A" - + codemirror_mode: sass + codemirror_mime_type: text/x-sass + language_id: 340 Scala: type: programming ace_mode: scala + codemirror_mode: clike + codemirror_mime_type: text/x-scala color: "#c22d40" extensions: - - .scala - - .sbt - - .sc + - ".scala" + - ".sbt" + - ".sc" interpreters: - scala - + language_id: 341 Scaml: group: HTML type: markup extensions: - - .scaml + - ".scaml" tm_scope: source.scaml ace_mode: text - + language_id: 342 Scheme: type: programming color: "#1e4aec" extensions: - - .scm - - .sld - - .sls - - .sps - - .ss + - ".scm" + - ".sld" + - ".sls" + - ".sps" + - ".ss" interpreters: - guile - bigloo @@ -3531,23 +3867,25 @@ Scheme: - gosh - r6rs ace_mode: scheme - + codemirror_mode: scheme + codemirror_mime_type: text/x-scheme + language_id: 343 Scilab: type: programming extensions: - - .sci - - .sce - - .tst + - ".sci" + - ".sce" + - ".tst" ace_mode: text - + language_id: 344 Self: type: programming color: "#0579aa" extensions: - - .self + - ".self" tm_scope: none ace_mode: text - + language_id: 345 Shell: type: programming search_term: bash @@ -3558,22 +3896,22 @@ Shell: - bash - zsh extensions: - - .sh - - .bash - - .bats - - .cgi - - .command - - .fcgi - - .ksh - - .sh.in - - .tmux - - .tool - - .zsh + - ".sh" + - ".bash" + - ".bats" + - ".cgi" + - ".command" + - ".fcgi" + - ".ksh" + - ".sh.in" + - ".tmux" + - ".tool" + - ".zsh" filenames: - - .bash_history - - .bash_logout - - .bash_profile - - .bashrc + - ".bash_history" + - ".bash_logout" + - ".bash_profile" + - ".bashrc" - PKGBUILD - gradlew interpreters: @@ -3582,255 +3920,315 @@ Shell: - sh - zsh ace_mode: sh - + codemirror_mode: shell + codemirror_mime_type: text/x-sh + language_id: 346 ShellSession: type: programming extensions: - - .sh-session + - ".sh-session" aliases: - bash session - console tm_scope: text.shell-session ace_mode: sh - + codemirror_mode: shell + codemirror_mime_type: text/x-sh + language_id: 347 Shen: type: programming color: "#120F14" extensions: - - .shen + - ".shen" tm_scope: none ace_mode: text - + language_id: 348 Slash: type: programming color: "#007eff" extensions: - - .sl + - ".sl" tm_scope: text.html.slash ace_mode: text - + language_id: 349 Slim: group: HTML type: markup - color: "#ff8f77" extensions: - - .slim + - ".slim" tm_scope: text.slim ace_mode: text - + codemirror_mode: slim + codemirror_mime_type: text/x-slim + language_id: 350 Smali: type: programming extensions: - - .smali + - ".smali" ace_mode: text tm_scope: source.smali - + language_id: 351 Smalltalk: type: programming color: "#596706" extensions: - - .st - - .cs + - ".st" + - ".cs" aliases: - squeak ace_mode: text - + codemirror_mode: smalltalk + codemirror_mime_type: text/x-stsrc + language_id: 352 Smarty: type: programming extensions: - - .tpl + - ".tpl" ace_mode: smarty + codemirror_mode: smarty + codemirror_mime_type: text/x-smarty tm_scope: text.html.smarty - + language_id: 353 SourcePawn: type: programming color: "#5c7611" aliases: - sourcemod extensions: - - .sp - - .inc - - .sma + - ".sp" + - ".inc" + - ".sma" tm_scope: source.sp ace_mode: text - + language_id: 354 Squirrel: type: programming color: "#800000" extensions: - - .nut + - ".nut" tm_scope: source.c++ ace_mode: c_cpp - + codemirror_mode: clike + codemirror_mime_type: text/x-c++src + language_id: 355 Stan: type: programming color: "#b2011d" extensions: - - .stan + - ".stan" ace_mode: text tm_scope: source.stan - + language_id: 356 Standard ML: type: programming color: "#dc566d" aliases: - sml extensions: - - .ML - - .fun - - .sig - - .sml + - ".ML" + - ".fun" + - ".sig" + - ".sml" tm_scope: source.ml ace_mode: text - + codemirror_mode: mllike + codemirror_mime_type: text/x-ocaml + language_id: 357 Stata: type: programming extensions: - - .do - - .ado - - .doh - - .ihlp - - .mata - - .matah - - .sthlp + - ".do" + - ".ado" + - ".doh" + - ".ihlp" + - ".mata" + - ".matah" + - ".sthlp" ace_mode: text - + language_id: 358 Stylus: type: markup group: CSS extensions: - - .styl + - ".styl" tm_scope: source.stylus ace_mode: stylus - + language_id: 359 SubRip Text: type: data extensions: - - .srt + - ".srt" ace_mode: text tm_scope: text.srt - + language_id: 360 +Sublime Text Config: + type: data + group: JSON + tm_scope: source.js + ace_mode: javascript + codemirror_mode: javascript + codemirror_mime_type: text/javascript + extensions: + - ".sublime-build" + - ".sublime-commands" + - ".sublime-completions" + - ".sublime-keymap" + - ".sublime-macro" + - ".sublime-menu" + - ".sublime-mousemap" + - ".sublime-project" + - ".sublime-settings" + - ".sublime-theme" + - ".sublime-workspace" + - ".sublime_metrics" + - ".sublime_session" + language_id: 423 SuperCollider: type: programming color: "#46390b" extensions: - - .sc - - .scd + - ".sc" + - ".scd" interpreters: - sclang - scsynth tm_scope: source.supercollider ace_mode: text - + language_id: 361 Swift: type: programming color: "#ffac45" extensions: - - .swift + - ".swift" ace_mode: text - + codemirror_mode: swift + codemirror_mime_type: text/x-swift + language_id: 362 SystemVerilog: type: programming color: "#DAE1C2" extensions: - - .sv - - .svh - - .vh + - ".sv" + - ".svh" + - ".vh" ace_mode: verilog - + codemirror_mode: verilog + codemirror_mime_type: text/x-systemverilog + language_id: 363 +TI Program: + type: programming + ace_mode: text + color: "#A0AA87" + extensions: + - ".8xp" + - ".8xk" + - ".8xk.txt" + - ".8xp.txt" + language_id: 422 + tm_scope: none TLA: type: programming extensions: - - .tla + - ".tla" tm_scope: source.tla ace_mode: text - + language_id: 364 TOML: type: data extensions: - - .toml + - ".toml" tm_scope: source.toml ace_mode: toml - + codemirror_mode: toml + codemirror_mime_type: text/x-toml + language_id: 365 TXL: type: programming extensions: - - .txl + - ".txl" tm_scope: source.txl ace_mode: text - + language_id: 366 Tcl: type: programming color: "#e4cc98" extensions: - - .tcl - - .adp - - .tm + - ".tcl" + - ".adp" + - ".tm" interpreters: - tclsh - wish ace_mode: tcl - + codemirror_mode: tcl + codemirror_mime_type: text/x-tcl + language_id: 367 Tcsh: type: programming group: Shell extensions: - - .tcsh - - .csh + - ".tcsh" + - ".csh" tm_scope: source.shell ace_mode: sh - + codemirror_mode: shell + codemirror_mime_type: text/x-sh + language_id: 368 TeX: type: markup color: "#3D6117" ace_mode: tex + codemirror_mode: stex + codemirror_mime_type: text/x-stex wrap: true aliases: - latex extensions: - - .tex - - .aux - - .bbx - - .bib - - .cbx - - .cls - - .dtx - - .ins - - .lbx - - .ltx - - .mkii - - .mkiv - - .mkvi - - .sty - - .toc - + - ".tex" + - ".aux" + - ".bbx" + - ".bib" + - ".cbx" + - ".cls" + - ".dtx" + - ".ins" + - ".lbx" + - ".ltx" + - ".mkii" + - ".mkiv" + - ".mkvi" + - ".sty" + - ".toc" + language_id: 369 Tea: type: markup extensions: - - .tea + - ".tea" tm_scope: source.tea ace_mode: text - + language_id: 370 Terra: type: programming extensions: - - .t + - ".t" color: "#00004c" ace_mode: lua + codemirror_mode: lua + codemirror_mime_type: text/x-lua interpreters: - lua - + language_id: 371 Text: type: prose wrap: true aliases: - fundamental extensions: - - .txt - - .fr - - .nb - - .ncl - - .no + - ".txt" + - ".fr" + - ".nb" + - ".ncl" + - ".no" filenames: - COPYING - INSTALL @@ -3845,343 +4243,374 @@ Text: - test.me tm_scope: none ace_mode: text - + language_id: 372 Textile: type: prose ace_mode: textile + codemirror_mode: textile + codemirror_mime_type: text/x-textile wrap: true extensions: - - .textile + - ".textile" tm_scope: none - + language_id: 373 Thrift: type: programming tm_scope: source.thrift extensions: - - .thrift + - ".thrift" ace_mode: text - + language_id: 374 Turing: type: programming color: "#cf142b" extensions: - - .t - - .tu + - ".t" + - ".tu" tm_scope: source.turing ace_mode: text - + language_id: 375 Turtle: type: data extensions: - - .ttl + - ".ttl" tm_scope: source.turtle ace_mode: text - + codemirror_mode: turtle + codemirror_mime_type: text/turtle + language_id: 376 Twig: type: markup group: HTML extensions: - - .twig + - ".twig" tm_scope: text.html.twig ace_mode: twig - + codemirror_mode: twig + codemirror_mime_type: text/x-twig + language_id: 377 TypeScript: type: programming color: "#2b7489" aliases: - ts extensions: - - .ts - - .tsx + - ".ts" + - ".tsx" tm_scope: source.ts ace_mode: typescript - + codemirror_mode: javascript + codemirror_mime_type: application/typescript + language_id: 378 Unified Parallel C: type: programming group: C ace_mode: c_cpp - color: "#4e3617" + codemirror_mode: clike + codemirror_mime_type: text/x-csrc extensions: - - .upc + - ".upc" tm_scope: source.c - + language_id: 379 Unity3D Asset: type: data ace_mode: yaml + codemirror_mode: yaml + codemirror_mime_type: text/x-yaml extensions: - - .anim - - .asset - - .mat - - .meta - - .prefab - - .unity + - ".anim" + - ".asset" + - ".mat" + - ".meta" + - ".prefab" + - ".unity" tm_scope: source.yaml - + language_id: 380 Uno: type: programming extensions: - - .uno + - ".uno" ace_mode: csharp + codemirror_mode: clike + codemirror_mime_type: text/x-csharp tm_scope: source.cs - + language_id: 381 UnrealScript: type: programming color: "#a54c4d" extensions: - - .uc + - ".uc" tm_scope: source.java ace_mode: java - + codemirror_mode: clike + codemirror_mime_type: text/x-java + language_id: 382 UrWeb: type: programming aliases: - Ur/Web - Ur extensions: - - .ur - - .urs + - ".ur" + - ".urs" tm_scope: source.ur ace_mode: text - + language_id: 383 VCL: group: Perl type: programming extensions: - - .vcl + - ".vcl" tm_scope: source.varnish.vcl ace_mode: text - + language_id: 384 VHDL: type: programming color: "#adb2cb" extensions: - - .vhdl - - .vhd - - .vhf - - .vhi - - .vho - - .vhs - - .vht - - .vhw + - ".vhdl" + - ".vhd" + - ".vhf" + - ".vhi" + - ".vho" + - ".vhs" + - ".vht" + - ".vhw" ace_mode: vhdl - + codemirror_mode: vhdl + codemirror_mime_type: text/x-vhdl + language_id: 385 Vala: type: programming color: "#fbe5cd" extensions: - - .vala - - .vapi + - ".vala" + - ".vapi" ace_mode: vala - + language_id: 386 Verilog: type: programming color: "#b2b7f8" extensions: - - .v - - .veo + - ".v" + - ".veo" ace_mode: verilog - + codemirror_mode: verilog + codemirror_mime_type: text/x-verilog + language_id: 387 VimL: type: programming color: "#199f4b" search_term: vim + tm_scope: source.viml aliases: - vim - nvim extensions: - - .vim + - ".vim" filenames: - - .nvimrc - - .vimrc + - ".nvimrc" + - ".vimrc" - _vimrc - gvimrc - nvimrc - vimrc ace_mode: text - + language_id: 388 Visual Basic: type: programming color: "#945db7" extensions: - - .vb - - .bas - - .cls - - .frm - - .frx - - .vba - - .vbhtml - - .vbs + - ".vb" + - ".bas" + - ".cls" + - ".frm" + - ".frx" + - ".vba" + - ".vbhtml" + - ".vbs" tm_scope: source.vbnet aliases: - vb.net - vbnet ace_mode: text - + codemirror_mode: vb + codemirror_mime_type: text/x-vb + language_id: 389 Volt: type: programming color: "#1F1F1F" extensions: - - .volt + - ".volt" tm_scope: source.d ace_mode: d - + codemirror_mode: d + codemirror_mime_type: text/x-d + language_id: 390 Vue: type: markup color: "#2c3e50" extensions: - - .vue + - ".vue" tm_scope: text.html.vue ace_mode: html - + language_id: 391 Wavefront Material: type: data extensions: - - .mtl + - ".mtl" tm_scope: source.wavefront.mtl ace_mode: text - + language_id: 392 Wavefront Object: type: data extensions: - - .obj + - ".obj" tm_scope: source.wavefront.obj ace_mode: text - + language_id: 393 Web Ontology Language: type: markup color: "#9cc9dd" extensions: - - .owl + - ".owl" tm_scope: text.xml ace_mode: xml - + language_id: 394 WebIDL: type: programming extensions: - - .webidl + - ".webidl" tm_scope: source.webidl ace_mode: text - + codemirror_mode: webidl + codemirror_mime_type: text/x-webidl + language_id: 395 World of Warcraft Addon Data: type: data extensions: - - .toc + - ".toc" tm_scope: source.toc ace_mode: text - + language_id: 396 X10: type: programming aliases: - xten ace_mode: text extensions: - - .x10 + - ".x10" color: "#4B6BEF" tm_scope: source.x10 - + language_id: 397 XC: type: programming color: "#99DA07" extensions: - - .xc + - ".xc" tm_scope: source.xc ace_mode: c_cpp - + codemirror_mode: clike + codemirror_mime_type: text/x-csrc + language_id: 398 XML: type: data ace_mode: xml + codemirror_mode: xml + codemirror_mime_type: text/xml aliases: - rss - xsd - wsdl extensions: - - .xml - - .ant - - .axml - - .builds - - .ccxml - - .clixml - - .cproject - - .csl - - .csproj - - .ct - - .dita - - .ditamap - - .ditaval - - .dll.config - - .dotsettings - - .filters - - .fsproj - - .fxml - - .glade - - .gml - - .grxml - - .iml - - .ivy - - .jelly - - .jsproj - - .kml - - .launch - - .mdpolicy - - .mm - - .mod - - .mxml - - .nproj - - .nuspec - - .odd - - .osm - - .pkgproj - - .plist - - .pluginspec - - .props - - .ps1xml - - .psc1 - - .pt - - .rdf - - .resx - - .rss - - .scxml - - .sfproj - - .srdf - - .storyboard - - .stTheme - - .sublime-snippet - - .targets - - .tmCommand - - .tml - - .tmLanguage - - .tmPreferences - - .tmSnippet - - .tmTheme - - .ts - - .tsx - - .ui - - .urdf - - .ux - - .vbproj - - .vcxproj - - .vssettings - - .vxml - - .wsdl - - .wsf - - .wxi - - .wxl - - .wxs - - .x3d - - .xacro - - .xaml - - .xib - - .xlf - - .xliff - - .xmi - - .xml.dist - - .xproj - - .xsd - - .xul - - .zcml + - ".xml" + - ".ant" + - ".axml" + - ".builds" + - ".ccxml" + - ".clixml" + - ".cproject" + - ".csl" + - ".csproj" + - ".ct" + - ".dita" + - ".ditamap" + - ".ditaval" + - ".dll.config" + - ".dotsettings" + - ".filters" + - ".fsproj" + - ".fxml" + - ".glade" + - ".gml" + - ".grxml" + - ".iml" + - ".ivy" + - ".jelly" + - ".jsproj" + - ".kml" + - ".launch" + - ".mdpolicy" + - ".mm" + - ".mod" + - ".mxml" + - ".nproj" + - ".nuspec" + - ".odd" + - ".osm" + - ".pkgproj" + - ".plist" + - ".pluginspec" + - ".props" + - ".ps1xml" + - ".psc1" + - ".pt" + - ".rdf" + - ".resx" + - ".rss" + - ".sch" + - ".scxml" + - ".sfproj" + - ".srdf" + - ".storyboard" + - ".stTheme" + - ".sublime-snippet" + - ".targets" + - ".tmCommand" + - ".tml" + - ".tmLanguage" + - ".tmPreferences" + - ".tmSnippet" + - ".tmTheme" + - ".ts" + - ".tsx" + - ".ui" + - ".urdf" + - ".ux" + - ".vbproj" + - ".vcxproj" + - ".vssettings" + - ".vxml" + - ".wsdl" + - ".wsf" + - ".wxi" + - ".wxl" + - ".wxs" + - ".x3d" + - ".xacro" + - ".xaml" + - ".xib" + - ".xlf" + - ".xliff" + - ".xmi" + - ".xml.dist" + - ".xproj" + - ".xsd" + - ".xul" + - ".zcml" filenames: - - .classpath - - .project + - ".classpath" + - ".project" - App.config - NuGet.config - Settings.StyleCop @@ -4189,178 +4618,192 @@ XML: - Web.Release.config - Web.config - packages.config - + language_id: 399 XPages: type: programming extensions: - - .xsp-config - - .xsp.metadata + - ".xsp-config" + - ".xsp.metadata" tm_scope: none ace_mode: xml - + codemirror_mode: xml + codemirror_mime_type: text/xml + language_id: 400 XProc: type: programming extensions: - - .xpl - - .xproc + - ".xpl" + - ".xproc" tm_scope: text.xml ace_mode: xml - + codemirror_mode: xml + codemirror_mime_type: text/xml + language_id: 401 XQuery: type: programming color: "#5232e7" extensions: - - .xquery - - .xq - - .xql - - .xqm - - .xqy + - ".xquery" + - ".xq" + - ".xql" + - ".xqm" + - ".xqy" ace_mode: xquery + codemirror_mode: xquery + codemirror_mime_type: application/xquery tm_scope: source.xq - + language_id: 402 XS: type: programming extensions: - - .xs + - ".xs" tm_scope: source.c ace_mode: c_cpp - + codemirror_mode: clike + codemirror_mime_type: text/x-csrc + language_id: 403 XSLT: type: programming aliases: - xsl extensions: - - .xslt - - .xsl + - ".xslt" + - ".xsl" tm_scope: text.xml.xsl ace_mode: xml + codemirror_mode: xml + codemirror_mime_type: text/xml color: "#EB8CEB" - + language_id: 404 Xojo: type: programming extensions: - - .xojo_code - - .xojo_menu - - .xojo_report - - .xojo_script - - .xojo_toolbar - - .xojo_window + - ".xojo_code" + - ".xojo_menu" + - ".xojo_report" + - ".xojo_script" + - ".xojo_toolbar" + - ".xojo_window" tm_scope: source.vbnet ace_mode: text - + language_id: 405 Xtend: type: programming extensions: - - .xtend + - ".xtend" ace_mode: text - + language_id: 406 YAML: type: data tm_scope: source.yaml aliases: - yml extensions: - - .yml - - .reek - - .rviz - - .sublime-syntax - - .syntax - - .yaml - - .yaml-tmlanguage + - ".yml" + - ".reek" + - ".rviz" + - ".sublime-syntax" + - ".syntax" + - ".yaml" + - ".yaml-tmlanguage" filenames: - - .clang-format + - ".clang-format" ace_mode: yaml - + codemirror_mode: yaml + codemirror_mime_type: text/x-yaml + language_id: 407 YANG: type: data extensions: - - .yang + - ".yang" tm_scope: source.yang ace_mode: text - + language_id: 408 Yacc: type: programming extensions: - - .y - - .yacc - - .yy + - ".y" + - ".yacc" + - ".yy" tm_scope: source.bison ace_mode: text color: "#4B6C4B" - + language_id: 409 Zephir: type: programming color: "#118f9e" extensions: - - .zep + - ".zep" tm_scope: source.php.zephir ace_mode: php - + language_id: 410 Zimpl: type: programming extensions: - - .zimpl - - .zmpl - - .zpl + - ".zimpl" + - ".zmpl" + - ".zpl" tm_scope: none ace_mode: text - + language_id: 411 desktop: type: data extensions: - - .desktop - - .desktop.in + - ".desktop" + - ".desktop.in" tm_scope: source.desktop ace_mode: text - + language_id: 412 eC: type: programming color: "#913960" search_term: ec extensions: - - .ec - - .eh + - ".ec" + - ".eh" tm_scope: source.c.ec ace_mode: text - + language_id: 413 edn: type: data ace_mode: clojure + codemirror_mode: clojure + codemirror_mime_type: text/x-clojure extensions: - - .edn + - ".edn" tm_scope: source.clojure - + language_id: 414 fish: type: programming group: Shell interpreters: - fish extensions: - - .fish + - ".fish" tm_scope: source.fish ace_mode: text - + language_id: 415 mupad: type: programming extensions: - - .mu + - ".mu" ace_mode: text - + language_id: 416 nesC: type: programming color: "#94B0C7" extensions: - - .nc + - ".nc" ace_mode: text tm_scope: source.nesc - + language_id: 417 ooc: type: programming color: "#b0b77e" extensions: - - .ooc + - ".ooc" ace_mode: text - + language_id: 418 reStructuredText: type: prose wrap: true @@ -4368,20 +4811,24 @@ reStructuredText: aliases: - rst extensions: - - .rst - - .rest - - .rest.txt - - .rst.txt + - ".rst" + - ".rest" + - ".rest.txt" + - ".rst.txt" ace_mode: text - + codemirror_mode: rst + codemirror_mime_type: text/x-rst + language_id: 419 wisp: type: programming ace_mode: clojure + codemirror_mode: clojure + codemirror_mime_type: text/x-clojure color: "#7582D1" extensions: - - .wisp + - ".wisp" tm_scope: source.clojure - + language_id: 420 xBase: type: programming color: "#403a40" @@ -4390,8 +4837,9 @@ xBase: - clipper - foxpro extensions: - - .prg - - .ch - - .prw + - ".prg" + - ".ch" + - ".prw" tm_scope: source.harbour ace_mode: text + language_id: 421 diff --git a/lib/linguist/strategy/modeline.rb b/lib/linguist/strategy/modeline.rb index 4e16a03c..5d63a6a0 100644 --- a/lib/linguist/strategy/modeline.rb +++ b/lib/linguist/strategy/modeline.rb @@ -1,19 +1,98 @@ module Linguist module Strategy class Modeline - EMACS_MODELINE = /-\*-\s*(?:(?!mode)[\w-]+\s*:\s*(?:[\w+-]+)\s*;?\s*)*(?:mode\s*:)?\s*([\w+-]+)\s*(?:;\s*(?!mode)[\w-]+\s*:\s*[\w+-]+\s*)*;?\s*-\*-/i + EMACS_MODELINE = / + -\*- + (?: + # Short form: `-*- ruby -*-` + \s* (?= [^:;\s]+ \s* -\*-) + | + # Longer form: `-*- foo:bar; mode: ruby; -*-` + (?: + .*? # Preceding variables: `-*- foo:bar bar:baz;` + [;\s] # Which are delimited by spaces or semicolons + | + (?<=-\*-) # Not preceded by anything: `-*-mode:ruby-*-` + ) + mode # Major mode indicator + \s*:\s* # Allow whitespace around colon: `mode : ruby` + ) + ([^:;\s]+) # Name of mode - # First form vim modeline - # [text]{white}{vi:|vim:|ex:}[white]{options} - # ex: 'vim: syntax=ruby' - VIM_MODELINE_1 = /(?:vim|vi|ex):\s*(?:ft|filetype|syntax)=(\w+)\s?/i + # Ensure the mode is terminated correctly + (?= + # Followed by semicolon or whitespace + [\s;] + | + # Touching the ending sequence: `ruby-*-` + (?]?\d+|m)? # Version-specific modeline + | + [\t\x20] # `ex:` requires whitespace, because "ex:" might be short for "example:" + ex + ) + + # If the option-list begins with `set ` or `se `, it indicates an alternative + # modeline syntax partly-compatible with older versions of Vi. Here, the colon + # serves as a terminator for an option sequence, delimited by whitespace. + (?= + # So we have to ensure the modeline ends with a colon + : (?=\s* set? \s [^\n:]+ :) | + + # Otherwise, it isn't valid syntax and should be ignored + : (?!\s* set? \s) + ) + + # Possible (unrelated) `option=value` pairs to skip past + (?: + # Option separator. Vim uses whitespace or colons to separate options (except if + # the alternate "vim: set " form is used, where only whitespace is used) + (?: + \s + | + \s* : \s* # Note that whitespace around colons is accepted too: + ) # vim: noai : ft=ruby:noexpandtab + + # Option's name. All recognised Vim options have an alphanumeric form. + \w* + + # Possible value. Not every option takes an argument. + (?: + # Whitespace between name and value is allowed: `vim: ft =ruby` + \s*= + + # Option's value. Might be blank; `vim: ft= ` says "use no filetype". + (?: + [^\\\s] # Beware of escaped characters: titlestring=\ ft=ruby + | # will be read by Vim as { titlestring: " ft=ruby" }. + \\. + )* + )? + )* + + # The actual filetype declaration + [\s:] (?:filetype|ft|syntax) \s*= + + # Language's name + (\w+) + + # Ensure it's followed by a legal separator + (?=\s|:|$) + /xi + + MODELINES = [EMACS_MODELINE, VIM_MODELINE] # Scope of the search for modelines # Number of lines to check at the beginning and at the end of the file diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml index 6b8c7364..5e83cd50 100644 --- a/lib/linguist/vendor.yml +++ b/lib/linguist/vendor.yml @@ -15,6 +15,9 @@ # Dependencies - ^[Dd]ependencies/ +# Distributions +- (^|/)dist/ + # C deps # https://github.com/joyent/node - ^deps/ @@ -165,7 +168,7 @@ # Chart.js - (^|/)Chart\.js$ -# Codemirror +# CodeMirror - (^|/)[Cc]ode[Mm]irror/(\d+\.\d+/)?(lib|mode|theme|addon|keymap|demo) # SyntaxHighlighter - http://alexgorbatchev.com/ @@ -229,6 +232,9 @@ # Fabric - Fabric.framework/ +# BuddyBuild +- BuddyBuildSDK.framework/ + # git config files - gitattributes$ - gitignore$ diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb index 8c15a584..2acc8fab 100644 --- a/lib/linguist/version.rb +++ b/lib/linguist/version.rb @@ -1,3 +1,3 @@ module Linguist - VERSION = "4.8.9" + VERSION = "4.8.16" end diff --git a/package.json b/package.json index 827997e5..c2e22111 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "repository": "https://github.com/github/linguist", "dependencies": { - "season": "~>5.0" + "season": "~>5.4" }, "license": "MIT" } diff --git a/samples/CSON/base.cson b/samples/CSON/base.cson new file mode 100644 index 00000000..d9941643 --- /dev/null +++ b/samples/CSON/base.cson @@ -0,0 +1,72 @@ +'atom-text-editor': + # Platform Bindings + 'home': 'editor:move-to-first-character-of-line' + 'end': 'editor:move-to-end-of-screen-line' + 'shift-home': 'editor:select-to-first-character-of-line' + 'shift-end': 'editor:select-to-end-of-line' + +'atom-text-editor:not([mini])': + # Atom Specific + 'ctrl-C': 'editor:copy-path' + + # Sublime Parity + 'tab': 'editor:indent' + 'enter': 'editor:newline' + 'shift-tab': 'editor:outdent-selected-rows' + 'ctrl-K': 'editor:delete-line' + +'.select-list atom-text-editor[mini]': + 'enter': 'core:confirm' + +'.tool-panel.panel-left, .tool-panel.panel-right': + 'escape': 'tool-panel:unfocus' + +'atom-text-editor !important, atom-text-editor[mini] !important': + 'escape': 'editor:consolidate-selections' + +# allow standard input fields to work correctly +'body .native-key-bindings': + 'tab': 'core:focus-next' + 'shift-tab': 'core:focus-previous' + 'enter': 'native!' + 'backspace': 'native!' + 'shift-backspace': 'native!' + 'delete': 'native!' + 'up': 'native!' + 'down': 'native!' + 'shift-up': 'native!' + 'shift-down': 'native!' + 'alt-up': 'native!' + 'alt-down': 'native!' + 'alt-shift-up': 'native!' + 'alt-shift-down': 'native!' + 'cmd-up': 'native!' + 'cmd-down': 'native!' + 'cmd-shift-up': 'native!' + 'cmd-shift-down': 'native!' + 'ctrl-up': 'native!' + 'ctrl-down': 'native!' + 'ctrl-shift-up': 'native!' + 'ctrl-shift-down': 'native!' + 'left': 'native!' + 'right': 'native!' + 'shift-left': 'native!' + 'shift-right': 'native!' + 'alt-left': 'native!' + 'alt-right': 'native!' + 'alt-shift-left': 'native!' + 'alt-shift-right': 'native!' + 'cmd-left': 'native!' + 'cmd-right': 'native!' + 'cmd-shift-left': 'native!' + 'cmd-shift-right': 'native!' + 'ctrl-left': 'native!' + 'ctrl-right': 'native!' + 'ctrl-shift-left': 'native!' + 'ctrl-shift-right': 'native!' + 'ctrl-b': 'native!' + 'ctrl-f': 'native!' + 'ctrl-F': 'native!' + 'ctrl-B': 'native!' + 'ctrl-h': 'native!' + 'ctrl-d': 'native!' diff --git a/samples/CSON/config.cson b/samples/CSON/config.cson new file mode 100644 index 00000000..5b0415b2 --- /dev/null +++ b/samples/CSON/config.cson @@ -0,0 +1,59 @@ +directoryIcons: + + Atom: + icon: "atom" + match: /^\.atom$/ + colour: "dark-green" + + Bower: + icon: "bower" + match: /^bower[-_]components$/ + colour: "bower" + + Dropbox: + icon: "dropbox" + match: /^(?:Dropbox|\.dropbox\.cache)$/ + colour: "medium-blue" + + Git: + icon: "git" + match: /^\.git$/ + + GitHub: + icon: "github" + match: /^\.github$/ + + Meteor: + icon: "meteor" + match: /^\.meteor$/ + + NodeJS: + icon: "node" + match: /^node_modules$/ + colour: "medium-green" + + Package: + icon: "package" + match: /^\.bundle$/i + + TextMate: + icon: "textmate" + match: ".tmBundle" + + +fileIcons: + + ABAP: + icon: "abap" + scope: "abp" + match: ".abap" + colour: "medium-orange" + + ActionScript: # Or Flash-related + icon: "as" + match: [ + [".swf", "medium-blue"] + [".as", "medium-red", scope: /\.(?:flex-config|actionscript(?:\.\d+)?)$/i, alias: /ActionScript\s?3|as3/i] + [".jsfl", "auto-yellow"] + [".swc", "dark-red"] + ] diff --git a/samples/CSON/ff-sfd.cson b/samples/CSON/ff-sfd.cson new file mode 100644 index 00000000..409d5caa --- /dev/null +++ b/samples/CSON/ff-sfd.cson @@ -0,0 +1,108 @@ +name: "Spline Font Database" +scopeName: "text.sfd" +fileTypes: ["sfd"] +firstLineMatch: "^SplineFontDB: [\\d.]+" +patterns: [include: "#main"] + +repository: + main: + patterns: [ + {include: "#punctuation"} + {include: "#private"} + {include: "#image"} + {include: "#pickleData"} + {include: "#sections"} + {include: "#copyright"} + {include: "#property"} + {include: "#control"} + {include: "#address"} + {include: "#encoding"} + {include: "source.fontforge#shared"} + {include: "#colour"} + ] + + punctuation: + patterns: [ + {match: "<|>", name: "punctuation.definition.brackets.angle.sfd"} + {match: "[{}]", name: "punctuation.definition.brackets.curly.sfd"} + ] + + private: + name: "meta.section.private.sfd" + begin: "^BeginPrivate(?=:)" + end: "^EndPrivate\\b" + beginCaptures: 0: name: "keyword.control.begin.private.sfd" + endCaptures: 0: name: "keyword.control.end.private.sfd" + patterns: [ + {match: "^\\S+", name: "entity.name.private.property.sfd"} + {include: "$self"} + ] + + image: + name: "meta.image.sfd" + begin: "^(Image)(?=:)(.+)$" + end: "^(EndImage)\\b" + contentName: "string.unquoted.raw.data.sfd" + beginCaptures: + 1: name: "keyword.control.begin.image.sfd" + 2: patterns: [include: "$self"] + endCaptures: + 1: name: "keyword.control.end.image.sfd" + + pickleData: + name: "meta.pickle-data.sfd" + begin: "^(PickledData)(:)\\s*(\")" + end: '"' + beginCaptures: + 1: name: "entity.name.property.sfd" + 2: name: "punctuation.separator.dictionary.key-value.sfd" + 3: name: "punctuation.definition.string.begin.sfd" + endCaptures: + 0: name: "punctuation.definition.string.end.sfd" + patterns: [match: "\\\\.", name: "constant.character.escape.sfd"] + + sections: + name: "meta.section.${2:/downcase}.sfd" + begin: "^(Start|Begin)([A-Z]\\w+)(?=:)" + end: "^(End\\2)\\b" + beginCaptures: 0: name: "keyword.control.begin.${2:/downcase}.sfd" + endCaptures: 0: name: "keyword.control.end.${2:/downcase}.sfd" + patterns: [include: "$self"] + + control: + name: "keyword.control.${1:/downcase}.sfd" + match: "\\b(Fore|Back|SplineSet|^End\\w+)\\b" + + colour: + name: "constant.other.hex.colour.sfd" + match: "(#)[A-Fa-f0-9]{3,}|(?<=\\s)[A-Fa-f0-9]{6,8}" + captures: + 1: name: "punctuation.definition.colour.sfd" + + encoding: + name: "constant.language.encoding.sfd" + match: "(?i)\\b(ISO[-\\w]+)(?<=\\d)(?=\\s|$)" + + # Don't highlight numbers in freeform strings (years/version strings) + copyright: + name: "meta.${1:/downcase}-string.sfd" + begin: "^(Copyright|U?Comments?|\\w+Name)(:)" + end: "$" + beginCaptures: + 1: name: "entity.name.property.sfd" + 2: name: "punctuation.separator.dictionary.key-value.sfd" + patterns: [include: "source.fontforge#stringEscapes"] + + # No idea what this is, but it looks distracting without a fix + # Assuming it's referring to a memory register or something. + address: + match: "\\d+[xX][A-Fa-f0-9]+" + name: "constant.numeric.hexadecimal.sfd" + + property: + match: "^([^:]+)(:)" + name: "meta.dictionary.key-value.sfd" + captures: + 1: name: "entity.name.property.sfd" + 2: name: "punctuation.separator.dictionary.key-value.sfd" + diff --git a/samples/CSON/wercker-status.cson b/samples/CSON/wercker-status.cson new file mode 100644 index 00000000..f4572b7a --- /dev/null +++ b/samples/CSON/wercker-status.cson @@ -0,0 +1,11 @@ +'menu': [ + { + 'label': 'Packages' + 'submenu': [ + 'label': 'Wercker Status' + 'submenu': [ + { 'label': 'Check now!', 'command': 'wercker-status:checknow' } + ] + ] + } +] diff --git a/samples/Emacs Lisp/filenames/.abbrev_defs b/samples/Emacs Lisp/filenames/.abbrev_defs new file mode 100644 index 00000000..dc29dfde --- /dev/null +++ b/samples/Emacs Lisp/filenames/.abbrev_defs @@ -0,0 +1,6 @@ +(define-abbrev-table 'c-mode-abbrev-table '( + )) +(define-abbrev-table 'fundamental-mode-abbrev-table '( + ("TM" "™" nil 0) + ("(R)" "®" nil 0) + ("C=" "€" nil 0))) diff --git a/samples/Emacs Lisp/filenames/.gnus b/samples/Emacs Lisp/filenames/.gnus new file mode 100644 index 00000000..bfd859dd --- /dev/null +++ b/samples/Emacs Lisp/filenames/.gnus @@ -0,0 +1,20 @@ +(setq user-full-name "Alhadis") +(setq user-mail-address "fake.account@gmail.com") + +(auto-image-file-mode) +(setq mm-inline-large-images t) +(add-to-list 'mm-attachment-override-types "image/*") + +(setq gnus-select-method + '(nnimap "gmail" + (nnimap-address "imap.gmail.com") + (nnimap-server-port 777) + (nnimap-stream ssl))) + +(setq message-send-mail-function 'smtpmail-send-it + smtpmail-starttls-credentials '(("smtp.gmail.com" 600 nil nil)) + smtpmail-auth-credentials '(("smtp.gmail.com" 700 "me@lisp.com" nil)) + smtpmail-default-smtp-server "smtp.gmail.com" + smtpmail-smtp-server "smtp.gmail.com" + smtpmail-smtp-service 800 + setq gnus-ignored-from-addresses "^from\\.Telstra[ \t\r\n]+Thanks") diff --git a/samples/Emacs Lisp/filenames/.viper b/samples/Emacs Lisp/filenames/.viper new file mode 100644 index 00000000..c3eeb658 --- /dev/null +++ b/samples/Emacs Lisp/filenames/.viper @@ -0,0 +1,10 @@ +(setq viper-inhibit-startup-message 't) +(setq viper-expert-level '5) + +; Key bindings +(define-key viper-vi-global-user-map "\C-d" 'end-of-line) + +; Return to top of window +(defun my-viper-return-to-top () + (interactive) + (beginning-of-buffer)) diff --git a/samples/Emacs Lisp/filenames/Project.ede b/samples/Emacs Lisp/filenames/Project.ede new file mode 100644 index 00000000..36a0c8bd --- /dev/null +++ b/samples/Emacs Lisp/filenames/Project.ede @@ -0,0 +1,34 @@ +;; Object EDE +(ede-proj-project "Linguist" + :name "Linguist" + :version "4.9" + :file "Project.ede" + :targets (list + (ede-proj-target-elisp-autoloads "autoloads" + :name "autoloads" + :path "test/samples/Emacs Lisp" + :autoload-file "dude.el" + ) + (ede-proj-target-elisp "init" + :name "init" + :path "" + :source '("ede-load.el" "wait-what.el") + :compiler 'ede-emacs-preload-compiler + :pre-load-packages '("sample-names") + ) + (ede-proj-target-elisp "what" + :name "the" + :path "" + :source '("h.el" "am-i-writing.el") + :versionsource '("hell.el") + :compiler 'ede-emacs-preload-compiler + :aux-packages '("what" "the" "hell-files" "am-i-writing") + ) + ) + :web-site-url "https://github.com/github/linguist" + :web-site-directory "../" + :web-site-file "CONTRIBUTING.md" + :ftp-upload-site "/ftp@git.hub.com:/madeup" + :configuration-variables 'nil + :metasubproject 't + ) diff --git a/samples/Emacs Lisp/filenames/_emacs b/samples/Emacs Lisp/filenames/_emacs new file mode 100644 index 00000000..4968f8eb --- /dev/null +++ b/samples/Emacs Lisp/filenames/_emacs @@ -0,0 +1,70 @@ +;; UTF-8 support +;; (set-language-environment "UTF-8") +(setenv "LANG" "en_AU.UTF-8") +(setenv "LC_ALL" "en_AU.UTF-8") +(setq default-tab-width 4) + + +;;; Function to load all ".el" files in ~/.emacs.d/config +(defun load-directory (directory) + "Recursively load all Emacs Lisp files in a directory." + (dolist (element (directory-files-and-attributes directory nil nil nil)) + (let* ((path (car element)) + (fullpath (concat directory "/" path)) + (isdir (car (cdr element))) + (ignore-dir (or (string= path ".") (string= path "..")))) + (cond + ((and (eq isdir t) (not ignore-dir)) + (load-directory fullpath)) + ((and (eq isdir nil) (string= (substring path -3) ".el")) + (load (file-name-sans-extension fullpath))))))) + +;; Tell Emacs we'd like to use Hunspell for spell-checking +(setq ispell-program-name (executable-find "hunspell")) + +;; Load Homebrew-installed packages +(let ((default-directory "/usr/local/share/emacs/site-lisp/")) + (normal-top-level-add-subdirs-to-load-path)) +(load "aggressive-indent") +(add-hook 'emacs-lisp-mode-hook #'aggressive-indent-mode) +(autoload 'rust-mode "rust-mode" nil t) +(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) + +;; Load Git-related syntax highlighting +(add-to-list 'load-path "~/.emacs.d/lisp/") +(load "git-modes") +(load "git-commit") + +;; Keybindings +(global-set-key (kbd "C-u") (lambda () + (interactive) + (kill-line 0))) + +;; Show cursor's current column number +(setq column-number-mode t) + +;; Disable autosave +(setq auto-save-default nil) + +;; Use a single directory for storing backup files +(setq backup-directory-alist `(("." . "~/.emacs.d/auto-save-list"))) +(setq backup-by-copying t) +(setq delete-old-versions t + kept-new-versions 6 + kept-old-versions 2 + version-control t) + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(blink-cursor-mode nil) + '(column-number-mode t) + '(show-paren-mode t)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/samples/Emacs Lisp/filenames/abbrev_defs b/samples/Emacs Lisp/filenames/abbrev_defs new file mode 100644 index 00000000..87dfad8c --- /dev/null +++ b/samples/Emacs Lisp/filenames/abbrev_defs @@ -0,0 +1,8 @@ +(define-abbrev-table 'fundamental-mode-abbrev-table '( + ("cat" "Concatenate" nil 0) + ("WTF" "World Trade Federation " nil 0) + ("rtbtm" "Read that back to me" nil 0))) + +(define-abbrev-table 'shell-script-mode-abbrev-table '( + ("brake", "bundle rake exec" nil 0) + ("pls", "warning: setting Encoding.default_external"))) diff --git a/samples/FORTRAN/bug-185631.f b/samples/FORTRAN/bug-185631.f new file mode 100644 index 00000000..abdf87b0 --- /dev/null +++ b/samples/FORTRAN/bug-185631.f @@ -0,0 +1,6 @@ +! Codes/HYCOM/hycom/ATLb2.00/src_2.0.01_22_one/ + real onemu, twomu + data onemu/0.0098/ + data twomu/1./ + data threemu/0.e9/ + end diff --git a/samples/Filebench WML/copyfiles.f b/samples/Filebench WML/copyfiles.f new file mode 100644 index 00000000..dc7f66fa --- /dev/null +++ b/samples/Filebench WML/copyfiles.f @@ -0,0 +1,51 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +set $dir=/tmp +set $nfiles=1000 +set $meandirwidth=20 +set $meanfilesize=16k +set $iosize=1m +set $nthreads=1 + +set mode quit firstdone + +define fileset name=bigfileset,path=$dir,size=$meanfilesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=100,paralloc +define fileset name=destfiles,path=$dir,size=$meanfilesize,entries=$nfiles,dirwidth=$meandirwidth + +define process name=filereader,instances=1 +{ + thread name=filereaderthread,memsize=10m,instances=$nthreads + { + flowop openfile name=openfile1,filesetname=bigfileset,fd=1 + flowop readwholefile name=readfile1,fd=1,iosize=$iosize + flowop createfile name=createfile2,filesetname=destfiles,fd=2 + flowop writewholefile name=writefile2,fd=2,srcfd=1,iosize=$iosize + flowop closefile name=closefile1,fd=1 + flowop closefile name=closefile2,fd=2 + } +} + +echo "Copyfiles Version 3.0 personality successfully loaded" diff --git a/samples/Julia/julia b/samples/Julia/julia new file mode 100644 index 00000000..c8fbb1f3 --- /dev/null +++ b/samples/Julia/julia @@ -0,0 +1,60 @@ +#!/usr/bin/env julia + +# From https://github.com/JoshCheek/language-sampler-for-fullpath/blob/b766dcdbd249ec63516f491390a75315e78cba95/julia/fullpath +help_screen = """ +usage: fullpath *[relative-paths] [-c] + + Prints the fullpath of the paths + If no paths are given as args, it will read them from stdin + + If there is only one path, the trailing newline is omitted + + The -c flag will copy the results into your pasteboard +""" + +help = false +copy = false +dir = pwd() +paths = [] + +for arg = ARGS + if arg == "-h" || arg == "--help" + help = true + elseif arg == "-c" || arg == "--copy" + copy = true + elseif arg != "" + push!(paths, arg) + end +end + +if help + print(help_screen) + exit() +end + +function notempty(string) + return !isempty(string) +end + +if length(paths) == 0 + paths = filter(notempty, map(chomp, readlines())) +end + +function print_paths(stream, paths) + if length(paths) == 1 + path = paths[1] + print(stream, "$dir/$path") + else + for path = paths + println(stream, "$dir/$path") + end + end +end + +if copy + read, write, process = readandwrite(`pbcopy`) + print_paths(write, paths) + close(write) +end + +print_paths(STDOUT, paths) diff --git a/samples/MQL4/header-sample.mqh b/samples/MQL4/header-sample.mqh new file mode 100644 index 00000000..4b5d2a18 --- /dev/null +++ b/samples/MQL4/header-sample.mqh @@ -0,0 +1,47 @@ +//+------------------------------------------------------------------+ +//| header-sample.mqh | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property strict +//+------------------------------------------------------------------+ +//| | +//+------------------------------------------------------------------+ +class CSomeObject + { +protected: + int m_someproperty; +private: + bool SomeFunction() {return true;} +public: + CSomeObject(void): m_someproperty(0) {} + ~CSomeObject(void) {} + void SetName(int n){m_someproperty=n;}// sets somepropery + int GetName(){return(m_someproperty);} // returns someproperty + }; +//+------------------------------------------------------------------+ diff --git a/samples/MQL4/indicator-sample.mq4 b/samples/MQL4/indicator-sample.mq4 new file mode 100644 index 00000000..e19d2868 --- /dev/null +++ b/samples/MQL4/indicator-sample.mq4 @@ -0,0 +1,61 @@ +//+------------------------------------------------------------------+ +//| indicator-sample.mq4 | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property version "1.00" +#property strict + +#property indicator_chart_window +#property indicator_plots 0 +//+------------------------------------------------------------------+ +//| Custom indicator initialization function | +//+------------------------------------------------------------------+ +void OnInit(void) + { + //--- + } +//+------------------------------------------------------------------+ +//| Bears Power | +//+------------------------------------------------------------------+ +int OnCalculate(const int rates_total, + const int prev_calculated, + const datetime &time[], + const double &open[], + const double &high[], + const double &low[], + const double &close[], + const long &tick_volume[], + const long &volume[], + const int &spread[]) + { + Print("The number of bars on the current chart: ",iBars(Symbol(),Period())); +//--- + return(rates_total); + } +//+------------------------------------------------------------------+ diff --git a/samples/MQL4/script-sample.mq4 b/samples/MQL4/script-sample.mq4 new file mode 100644 index 00000000..b4d6812d --- /dev/null +++ b/samples/MQL4/script-sample.mq4 @@ -0,0 +1,51 @@ +//+------------------------------------------------------------------+ +//| script-sample.mq4 | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property version "1.00" +#property strict +#property script_show_inputs + +input int StopLoss=100; //Stop Loss +input int TakeProfit=100; //Take Profit +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + double minstoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL); + Print("Minimum Stop Level=",minstoplevel," points"); +//--- + double sl=NormalizeDouble(Bid-StopLoss*Point,Digits); + double tp=NormalizeDouble(Ask+TakeProfit*Point,Digits); +//--- + int result=OrderSend(Symbol(),OP_BUY,0.01,Ask,1,sl,tp,"Test",0,0,clrNONE); + Print("Success? ",result); + } +//+------------------------------------------------------------------+ diff --git a/samples/MQL5/Regex.mqh b/samples/MQL5/Regex.mqh new file mode 100644 index 00000000..ca7be7e1 --- /dev/null +++ b/samples/MQL5/Regex.mqh @@ -0,0 +1,1390 @@ +//+------------------------------------------------------------------+ +//| Regular Expression | +//| Copyright 2016, MetaQuotes Software Corp. | +//| https://www.mql5.com | +//+------------------------------------------------------------------+ +//| Regular Expression Library from .NET Framework 4.6.1 implemented | +//| in MetaQuotes Language 5 (MQL5) | +//| Original sources at https://github.com/Microsoft/referencesource | +//| | +//| The capabilities of the Regular Expression Library include: | +//| - Lazy quantifiers | +//| - Positive and negative lookbehind | +//| - Conditional evaluation | +//| - Balancing group definitions | +//| - Nonbacktracking subexpressions | +//| - Right-to-left matching | +//| | +//| If you find any functional differences between Regular Expression| +//| Library for MQL5 and the original .NET Framework 4.6.1 project, | +//| please contact developers of MQL5 on the Forum at www.mql5.com. | +//| | +//| You can report bugs found in the computational algorithms of the | +//| Regular Expression Library from .Net Framework 4.6.1 by notifying| +//| the project coordinators. | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +class Match; +class MatchCollection; +class CachedCodeEntry; +class ReplacementReference; +class RunnerReference; +class RegexRunner; +//+------------------------------------------------------------------+ +//| Callback class. | +//+------------------------------------------------------------------+ +typedef string(*MatchEvaluator)(Match*); +#include +#include +#include +#include "RegexOptions.mqh" +#include "RegexCode.mqh" +#include "RegexTree.mqh" +#include "RegexParser.mqh" +#include "RegexReplacement.mqh" +#include "RegexWriter.mqh" +#include "RegexMatchCollection.mqh" +#include "RegexRunner.mqh" +#include "RegexInterpreter.mqh" +//+------------------------------------------------------------------+ +//| Purpose: The Regex class represents a single compiled instance of| +//| a regular expression. | +//+------------------------------------------------------------------+ +//+------------------------------------------------------------------+ +//| Represents an immutable, compiled regular expression. Also | +//| contains static methods that allow use of regular expressions | +//| without instantiating a Regex explicitly. | +//+------------------------------------------------------------------+ +class Regex + { +protected: + string m_pattern; + RegexOptions m_roptions; +private: + static const TimeSpan MaximumMatchTimeout; +public: + static const TimeSpan InfiniteMatchTimeout; +protected: + TimeSpan m_internalMatchTimeout;// timeout for the execution of this regex +private: + static const string DefaultMatchTimeout_ConfigKeyName; +public: + static const TimeSpan FallbackDefaultMatchTimeout; + static const TimeSpan DefaultMatchTimeout; +protected: + Dictionary*m_caps; // if captures are sparse, this is the hashtable capnum->index + Dictionary*m_capnames; // if named captures are used, this maps names->index + string m_capslist[]; // if captures are sparse or named captures are used, this is the sorted list of names + int m_capsize; // the size of the capture array + RegexTree *m_tree; + RunnerReference *m_runnerref; // cached runner + ReplacementReference*m_replref; // cached parsed replacement pattern + RegexCode *m_code; // if interpreted, this is the code for RegexIntepreter + bool m_refsInitialized;// Default is false + static LinkedListm_livecode;// the cached of code that are currently loaded + static int m_cacheSize; // Default is 15 +public: + static const int MaxOptionShift; +public: + //--- Constructors: + //+------------------------------------------------------------------+ + //| Initializes a new instance of the Regex class. | + //+------------------------------------------------------------------+ + Regex() : m_refsInitialized(false) + { + this.m_internalMatchTimeout=DefaultMatchTimeout; + } + //+------------------------------------------------------------------+ + //| Creates and compiles a regular expression object for the | + //| specified regular expression. | + //+------------------------------------------------------------------+ + Regex(const string pattern) : m_refsInitialized(0) + { + Initialize(pattern,None,DefaultMatchTimeout,false); + } + //+------------------------------------------------------------------+ + //| Creates and compiles a regular expression object for the | + //| specified regular expression with options that modify the | + //| pattern. | + //+------------------------------------------------------------------+ + Regex(const string pattern,RegexOptions options) : m_refsInitialized(0) + { + Initialize(pattern,options,DefaultMatchTimeout,false); + } + //+------------------------------------------------------------------+ + //| Initializes a new instance of the Regex class for the specified | + //| regular expression,with options that modify the pattern and a | + //| value that specifies how long a pattern matching method should | + //| attempt a match before it times out. | + //+------------------------------------------------------------------+ + Regex(const string pattern,RegexOptions options,const TimeSpan &matchTimeout) : m_refsInitialized(0) + { + Initialize(pattern,options,matchTimeout,false); + } + //--- Destructors: + //+------------------------------------------------------------------+ + //| Destructor without parameters. | + //+------------------------------------------------------------------+ + ~Regex() + { + if(CheckPointer(m_tree)==POINTER_DYNAMIC) + { + delete m_tree; + } + if(CheckPointer(m_caps)==POINTER_DYNAMIC) + { + delete m_caps; + } + bool deleteRun=true; + bool deleteRepl = true; + bool deleteCode = true; + for(LinkedListNode*current=m_livecode.First(); current!=NULL; current=current.Next()) + { + if(CheckPointer(current.Value())==POINTER_DYNAMIC) + { + if(current.Value().RunnerRef()==m_runnerref) + { + deleteRun=false; + } + if(current.Value().ReplRef()==m_replref) + { + deleteRepl=false; + } + if(current.Value().Code()==m_code) + { + deleteCode=false; + } + } + } + if(CheckPointer(m_replref)==POINTER_DYNAMIC && deleteRepl) + { + delete m_replref; + } + if(CheckPointer(m_runnerref)==POINTER_DYNAMIC && deleteRun) + { + delete m_runnerref; + } + if(CheckPointer(m_code)==POINTER_DYNAMIC && deleteCode) + { + delete m_code; + } + } +private: + //+------------------------------------------------------------------+ + //| General constructor with parameters. | + //+------------------------------------------------------------------+ + Regex(const string pattern,RegexOptions options,const TimeSpan &matchTimeout,const bool useCache) : m_refsInitialized(0) + { + Initialize(pattern,options,matchTimeout,useCache); + } + //--- Methods: + //+------------------------------------------------------------------+ + //| Initialize. | + //+------------------------------------------------------------------+ + void Initialize(const string pattern,RegexOptions options,const TimeSpan &matchTimeout,const bool useCache) + { + RegexTree *tree; + CachedCodeEntry *cached=NULL; + if(pattern==NULL) + { + Print("Argument 'pattern'= Null."); + //--- return + return; + } + if(options>MaxOptionShift)!=0) + { + Print("Argument 'options' out of range."); + //--- return + return; + } + if((options &ECMAScript)!=0 + && (options &~(ECMAScript|IgnoreCase|Multiline + #ifdef _DEBUG + |Debug + #endif + ))!=0) + { + Print("Argument 'options' out of range"); + //--- return + return; + } + ValidateMatchTimeout(matchTimeout); + //--- Try to look up this regex in the cache. We do this regardless of whether useCache is true since there's really no reason not to. + string key=IntegerToString(options)+":"+pattern; + cached=LookupCachedAndUpdate(key); + this.m_pattern=pattern; + this.m_roptions=options; + this.m_internalMatchTimeout=matchTimeout; + if(cached==NULL) + { + //--- Parse the input + tree=RegexParser::Parse(pattern,(RegexOptions)m_roptions); + //--- Extract the relevant information + m_capnames=tree.CapNames(); + tree.GetCapsList(m_capslist); + m_code = RegexWriter::Write(tree); + m_caps = m_code.Caps(); + m_capsize = m_code.CapSize(); + InitializeReferences(); + m_tree=tree; + if(useCache) + { + cached=CacheCode(key); + } + } + else + { + m_caps = cached.Caps(); + m_capnames = cached.CapNames(); + cached.GetCapList(m_capslist); + m_capsize = cached.CapSize(); + m_code = cached.Code(); + m_runnerref = cached.RunnerRef(); + m_replref = cached.ReplRef(); + m_refsInitialized=true; + } + } +public: + //--- Methods: + //+------------------------------------------------------------------+ + //| Pattern. | + //+------------------------------------------------------------------+ + string Pattern() + { + //--- return pattern + return (m_pattern); + } + //+------------------------------------------------------------------+ + //| Validates that the specified match timeout value is valid. | + //| The valid range is: | + //| TimeSpan::Zero < matchTimeout <= Regex::MaximumMatchTimeout. | + //+------------------------------------------------------------------+ + static void ValidateMatchTimeout(const TimeSpan &matchTimeout) + { + if(InfiniteMatchTimeout==matchTimeout) + { + //--- return + return; + } + //--- Change this to make sure timeout is not longer then Environment.Ticks cycle length: + if(TimeSpan::Zero()*Caps() + { + //--- + return (m_caps); + } + Dictionary*CapNames() + { + //--- return + return (m_capnames); + } + int CapSize() + { + //--- + return (m_capsize); + } + //+------------------------------------------------------------------+ + //| Returns the options passed into the constructor. | + //+------------------------------------------------------------------+ + RegexOptions Options() + { + //--- return + return (m_roptions); + } + //+------------------------------------------------------------------+ + //| Escape metacharacters within the string. | + //+------------------------------------------------------------------+ + static string Escape(const string str) + { + if(StringLen(str)==NULL) + { + Print("Argument 'str' = NULL."); + //--- return NULL + return (NULL); + } + //--- return result + return RegexParser::Escape(str); + } + //+------------------------------------------------------------------+ + //| Unescape character codes within the string. | + //+------------------------------------------------------------------+ + static string Unescape(const string str) + { + if(StringLen(str)==NULL) + { + Print("Argument 'str' = NULL."); + //--- return NULL + return (NULL); + } + //--- return result + return RegexParser::Unescape(str); + } + //+------------------------------------------------------------------+ + //| CacheCount. | + //+------------------------------------------------------------------+ + static int CacheCount() + { + //--- return count + return (m_livecode.Count()); + } + //+------------------------------------------------------------------+ + //| CacheSize. | + //+------------------------------------------------------------------+ + static int CacheSize() + { + //--- return size + return (m_cacheSize); + } + //+------------------------------------------------------------------+ + //| CacheSize. | + //+------------------------------------------------------------------+ + static void CacheSize(const int value) + { + if(value<0) + { + Print("Argument 'value' out of range."); + //--- return + return; + } + m_cacheSize=value; + if(m_livecode.Count()>m_cacheSize) + { + while(m_livecode.Count()>m_cacheSize) + { + m_livecode.RemoveLast(); + } + } + } + //+------------------------------------------------------------------+ + //| The match timeout used by this Regex instance. | + //+------------------------------------------------------------------+ + TimeSpan MatchTimeout() + { + //--- return result + return (m_internalMatchTimeout); + } + //+------------------------------------------------------------------+ + //| True if the regex is leftward. | + //| | + //| Indicates whether the regular expression matches from right to | + //| left. | + //+------------------------------------------------------------------+ + bool RightToLeft() + { + //--- return result + return UseOptionR(); + } + //+------------------------------------------------------------------+ + //| Returns the regular expression pattern passed into the | + //| constructor. | + //+------------------------------------------------------------------+ + string ToString() + { + //--- return result + return (m_pattern); + } + //+------------------------------------------------------------------+ + //| Returns an array of the group names that are used to capture | + //| groups in the regular expression. Only needed if the regex is not| + //| known until runtime, and one wants to extract captured groups. | + //| (Probably unusual, but supplied for completeness.). | + //+------------------------------------------------------------------+ + void GetGroupNames(string &result[]) + { + if(ArraySize(m_capslist)==NULL) + { + int max=m_capsize; + ArrayResize(result,max); + for(int i=0; i*de=m_caps.GetEnumerator(); + while(de.MoveNext()) + { + result[(int)de.Value()]=(int)de.Key(); + } + delete de; + } + } + //+------------------------------------------------------------------+ + //| Given a group number, maps it to a group name. Note that nubmered| + //| groups automatically get a group name that is the decimal string | + //| equivalent of its number. | + //+------------------------------------------------------------------+ + string GroupNameFromNumber(const int index) + { + int i=index; + if(ArraySize(m_capslist)==NULL) + { + if(i>=0 && i=0 && i'9' || ch<'0') + { + //--- return result + return (-1); + } + result *= 10; + result += (ch - '0'); + } + //--- return int if it's in range + if(result>=0 && resultStringLen(in)) + { + Print("Argument 'start' out of range."); + //--- return NULL + return (NULL); + } + if(length<0 || length>StringLen(in)) + { + Print("Argument 'length' out of range."); + //--- return NULL + return (NULL); + } + bool fromCache=false; + //--- There may be a cached runner; grab ownership of it if we can. + if(m_runnerref!=NULL) + { + fromCache=true; + runner=m_runnerref.Get(); + } + //--- Create a RegexRunner instance if we need to + if(runner==NULL) + { + fromCache=false; + //--- Use the compiled RegexRunner factory if the code was compiled to MSIL + runner=new RegexInterpreter(m_code); + } + //--- Do the scan starting at the requested position + match=runner.Scan(GetPointer(this),in,beginning,beginning+length,startat,prevlen,quick,m_internalMatchTimeout); + if(m_runnerref!=NULL && !fromCache) + { + if(CheckPointer(m_runnerref.Get())==POINTER_DYNAMIC) + { + delete m_runnerref.Get(); + } + //--- Release or fill the cache slot + m_runnerref.Set(runner); + } + else if(!fromCache) + { + delete runner; + } +#ifdef _DEBUG + if(Debug() && match!=NULL) + { + match.Dump(); + } +#endif + //--- return result + return (match); + } + //+------------------------------------------------------------------+ + //| Find code cache based on options+pattern. | + //+------------------------------------------------------------------+ + static CachedCodeEntry *LookupCachedAndUpdate(const string key) + { + for(LinkedListNode*current=m_livecode.First(); current!=NULL; current=current.Next()) + { + if(current.Value().Key()==key) + { + //--- If we find an entry in the cache, move it to the head at the same time. + m_livecode.Remove(current); + m_livecode.AddFirst(current); + //--- retrun result + return (current.Value()); + } + } + //--- return result + return (NULL); + } + //+------------------------------------------------------------------+ + //| Add current code to the cache. | + //+------------------------------------------------------------------+ + CachedCodeEntry *CacheCode(const string key) + { + CachedCodeEntry *newcached=NULL; + //--- first look for it in the cache and move it to the head + for(LinkedListNode*current=m_livecode.First(); current!=NULL; current=current.Next()) + { + if(current.Value().Key()==key) + { + m_livecode.Remove(current); + m_livecode.AddFirst(current); + //--- return result + return (current.Value()); + } + } + //--- it wasn't in the cache, so we'll add a new one. Shortcut out for the case where cacheSize is zero. + if(m_cacheSize!=0) + { + newcached=new CachedCodeEntry(key,m_capnames,m_capslist,m_code,m_caps,m_capsize,m_runnerref,m_replref); + m_livecode.AddFirst(newcached); + if(m_livecode.Count()>m_cacheSize) + { + m_livecode.RemoveLast(); + } + } + //--- return result + return (newcached); + } + //+------------------------------------------------------------------+ + //| Delete all objects in cache. | + //+------------------------------------------------------------------+ + static void ClearCache() + { + IEnumerator*en=m_livecode.GetEnumerator(); + while(en.MoveNext()) + { + if(CheckPointer(en.Current())==POINTER_DYNAMIC) + { + if(CheckPointer(en.Current().RunnerRef().Get().RunRegex())==POINTER_DYNAMIC) + { + delete en.Current().RunnerRef().Get().RunRegex(); + } + delete en.Current(); + } + } + delete en; + } + //+------------------------------------------------------------------+ + //| True if the O option was set. | + //+------------------------------------------------------------------+ + bool UseOptionC() + { + return(m_roptions) != 0; + } + //+------------------------------------------------------------------+ + //| True if the L option was set. | + //+------------------------------------------------------------------+ + bool UseOptionR() + { + return(m_roptions & RightToLeft) != 0; + } + //+------------------------------------------------------------------+ + //| UseOptionInvariant. | + //+------------------------------------------------------------------+ + bool UseOptionInvariant() + { + return(m_roptions) != 0; + } +#ifdef _DEBUG + //+------------------------------------------------------------------+ + //| True if the regex has debugging enabled. | + //+------------------------------------------------------------------+ + bool Debug() + { + //--- return result + return((m_roptions &Debug) != 0); + } +#endif + }; +static const TimeSpan Regex::MaximumMatchTimeout=TimeSpan::FromMilliseconds(Int32::MaxValue-1); +static const TimeSpan Regex::InfiniteMatchTimeout(0,0,0,0,-1); +static const string Regex::DefaultMatchTimeout_ConfigKeyName="REGEX_DEFAULT_MATCH_TIMEOUT"; +static const TimeSpan Regex::FallbackDefaultMatchTimeout=Regex::InfiniteMatchTimeout; +static const TimeSpan Regex::DefaultMatchTimeout=Regex::InitDefaultMatchTimeout(); +static LinkedListRegex::m_livecode(); +static int Regex::m_cacheSize=15; +static const int Regex::MaxOptionShift=10; +//+------------------------------------------------------------------+ +//| Purpose: Used to cache byte codes or compiled factories. | +//+------------------------------------------------------------------+ +class CachedCodeEntry : public IComparable + { +private: + string m_key; + RegexCode *m_code; + Dictionary*m_caps; + Dictionary*m_capnames; + string m_capslist[]; + int m_capsize; + RunnerReference *m_runnerref; + ReplacementReference *m_replref; +public: + //--- Constructors: + //+------------------------------------------------------------------+ + //| Constructor with parameters. | + //+------------------------------------------------------------------+ + CachedCodeEntry(const string key,Dictionary*capnames,const string &capslist[], + RegexCode *code,Dictionary*caps,const int capsize, + RunnerReference *runner,ReplacementReference *repl) + { + m_key=key; + m_capnames=capnames; + ArrayCopy(m_capslist,capslist); + m_code= code; + m_caps= caps; + m_capsize=capsize; + m_runnerref=runner; + m_replref=repl; + } + //--- Destructors: + //+------------------------------------------------------------------+ + //| destructor without parameters. | + //+------------------------------------------------------------------+ + ~CachedCodeEntry() + { + if(CheckPointer(m_code)==POINTER_DYNAMIC) + { + delete m_code; + } + if(CheckPointer(m_caps)==POINTER_DYNAMIC) + { + delete m_caps; + } + if(CheckPointer(m_capnames)==POINTER_DYNAMIC) + { + delete m_capnames; + } + if(CheckPointer(m_replref)==POINTER_DYNAMIC) + { + delete m_replref; + } + if(CheckPointer(m_runnerref)==POINTER_DYNAMIC) + { + delete m_runnerref; + } + } + //--- Methods: + //+------------------------------------------------------------------+ + //| Gets the runnerref. | + //+------------------------------------------------------------------+ + RunnerReference *RunnerRef() + { + //--- reurn runnerref + return (m_runnerref); + } + //+------------------------------------------------------------------+ + //| Gets the replref. | + //+------------------------------------------------------------------+ + ReplacementReference *ReplRef() + { + //--- return replref + return (m_replref); + } + //+------------------------------------------------------------------+ + //| Gets the key. | + //+------------------------------------------------------------------+ + string Key() + { + //--- return key + return (m_key); + } + //+------------------------------------------------------------------+ + //| Gets the caps. | + //+------------------------------------------------------------------+ + Dictionary*Caps() + { + //--- return caps + return (m_caps); + } + //+------------------------------------------------------------------+ + //| Gets the capnames. | + //+------------------------------------------------------------------+ + Dictionary*CapNames() + { + //--- return capnames + return (m_capnames); + } + //+------------------------------------------------------------------+ + //| Gets the capsize. | + //+------------------------------------------------------------------+ + int CapSize() + { + //--- retrun capsize + return (m_capsize); + } + //+------------------------------------------------------------------+ + //| Gets the code. | + //+------------------------------------------------------------------+ + RegexCode *Code() + { + //--- return code + return (m_code); + } + //+------------------------------------------------------------------+ + //| Gets the caplist. | + //+------------------------------------------------------------------+ + void GetCapList(string &array[]) + { + ArrayCopy(array,m_capslist); + } + }; +//+------------------------------------------------------------------+ +//| Used to cache a weak reference in a threadsafe way. | +//+------------------------------------------------------------------+ +class ReplacementReference + { +private: + RegexReplacement *m_obj; +public: + //--- Destructors: + //+------------------------------------------------------------------+ + //| Destructor without parameters. | + //+------------------------------------------------------------------+ + ~ReplacementReference() + { + if(CheckPointer(m_obj)==POINTER_DYNAMIC) + { + delete m_obj; + } + } + //--- Methods: + //+------------------------------------------------------------------+ + //| Get RegexReplacement. | + //+------------------------------------------------------------------+ + RegexReplacement *Get() + { + //--- return pointer + return (m_obj); + } + //+------------------------------------------------------------------+ + //| Set RegexReplacement. | + //+------------------------------------------------------------------+ + void Set(RegexReplacement *obj) + { + m_obj=obj; + } + }; +//+------------------------------------------------------------------+ +//| Used to cache one exclusive runner reference. | +//+------------------------------------------------------------------+ +class RunnerReference + { +private: + RegexRunner *m_obj; +public: + //--- Destructors: + //+------------------------------------------------------------------+ + //| Destructor without parameters. | + //+------------------------------------------------------------------+ + ~RunnerReference() + { + if(CheckPointer(m_obj)==POINTER_DYNAMIC) + { + delete m_obj; + } + } + //--- Methods: + //+------------------------------------------------------------------+ + //| Get RegexRunner. | + //+------------------------------------------------------------------+ + RegexRunner *Get() + { + //--- return pointer + return (m_obj); + } + //+------------------------------------------------------------------+ + //| Set RegexRunner. | + //+------------------------------------------------------------------+ + void Set(RegexRunner *obj) + { + m_obj=obj; + } + }; +//+------------------------------------------------------------------+ diff --git a/samples/MQL5/indicator-sample.mq5 b/samples/MQL5/indicator-sample.mq5 new file mode 100644 index 00000000..fdd42f58 --- /dev/null +++ b/samples/MQL5/indicator-sample.mq5 @@ -0,0 +1,64 @@ +//+------------------------------------------------------------------+ +//| indicator-sample.mq5 | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property version "1.00" + +#property indicator_chart_window +#property indicator_plots 0 +//+------------------------------------------------------------------+ +//| Custom indicator initialization function | +//+------------------------------------------------------------------+ +int OnInit() + { +//--- + return(INIT_SUCCEEDED); + } +//+------------------------------------------------------------------+ +//| Custom indicator iteration function | +//+------------------------------------------------------------------+ +int OnCalculate(const int rates_total, + const int prev_calculated, + const datetime &time[], + const double &open[], + const double &high[], + const double &low[], + const double &close[], + const long &tick_volume[], + const long &volume[], + const int &spread[]) + { +//--- + int bars=Bars(Symbol(),0); + Print("Bars = ",bars,", rates_total = ",rates_total,", prev_calculated = ",prev_calculated); + Print("time[0] = ",time[0]," time[rates_total-1] = ",time[rates_total-1]); +//--- return value of prev_calculated for next call + return(rates_total); + } +//+------------------------------------------------------------------+ diff --git a/samples/MQL5/script-sample.mq5 b/samples/MQL5/script-sample.mq5 new file mode 100644 index 00000000..c741218a --- /dev/null +++ b/samples/MQL5/script-sample.mq5 @@ -0,0 +1,56 @@ +//+------------------------------------------------------------------+ +//| script-sample.mq5 | +//| Copyright 2016, Andrey Osorgin | +//+------------------------------------------------------------------+ +//| The MIT License (MIT) | +//| | +//| Permission is hereby granted, free of charge, to any person | +//| obtaining a copy of this software and associated documentation | +//| files (the "Software"), to deal in the Software without | +//| restriction, including without limitation the rights to use, | +//| copy, modify, merge, publish, distribute, sublicense, and/or sell| +//| copies of the Software, and to permit persons to whom the | +//| Software is furnished to do so, subject to the following | +//| conditions: | +//| | +//| The above copyright notice and this permission notice shall be | +//| included in all copies or substantial portions of the Software. | +//| | +//| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | +//| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | +//| OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | +//| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | +//| HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | +//| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | +//| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | +//| OTHER DEALINGS IN THE SOFTWARE. | +//| | +//| A copy of the MIT License (MIT) is available at | +//| https://opensource.org/licenses/MIT | +//+------------------------------------------------------------------+ +#property version "1.00" +#property script_show_inputs + +#include + +input int StopLoss=100; // Stop Loss +input int TakeProfit=100; // Take Profit +//+------------------------------------------------------------------+ +//| Script program start function | +//+------------------------------------------------------------------+ +void OnStart() + { + CTrade trade; +//--- + long stoplevel=SymbolInfoInteger(Symbol(),SYMBOL_TRADE_STOPS_LEVEL); + Print("Minimum stop level is: ",stoplevel); + double ask=SymbolInfoDouble(Symbol(),SYMBOL_ASK); + double bid=SymbolInfoDouble(Symbol(),SYMBOL_BID); + double sl = NormalizeDouble(bid - StopLoss*Point(),Digits()); + double tp = NormalizeDouble(ask + TakeProfit*Point(),Digits()); +//--- + bool result=trade.Buy(0.01,Symbol(),ask,sl,tp,"test"); +//--- + Print("Success? ",result); + } +//+------------------------------------------------------------------+ diff --git a/samples/Makefile/file-icons.make b/samples/Makefile/file-icons.make new file mode 100644 index 00000000..09d8a78c --- /dev/null +++ b/samples/Makefile/file-icons.make @@ -0,0 +1,134 @@ +charmap := charmap.md +font-name := file-icons +font-folder := dist +font-config := icomoon.json +icon-size := 34 +icon-folder := svg +repo-name := Alhadis/FileIcons +svg := $(wildcard $(icon-folder)/*.svg) +last-commit = $(shell git log -1 --oneline --no-abbrev | cut -d' ' -f1) + + +all: unpack $(font-folder)/$(font-name).woff2 charmap + + +# Aliases +unpack: $(font-folder)/$(font-name).ttf +charmap: $(charmap) + + +# Extract a downloaded IcoMoon folder +$(font-folder)/%.ttf: %.zip + @rm -rf $(font-folder) tmp $(font-config) + @unzip -qd tmp $^ + @mv tmp/fonts $(font-folder) + @mv tmp/selection.json $(font-config) + @rm -rf tmp $^ + @perl -pi -e 's|^( {2})+|"\t" x (length($$&)/2)|ge' $(font-config) + @echo "" >> $(font-config) # Ensure trailing newline + @echo "Files extracted." + + +# Generate a WOFF2 file from a TTF +%.woff2: %.ttf + @[ ! -f $@ ] && { \ + hash woff2_compress 2>/dev/null || { \ + echo >&2 "WOFF2 conversion tools not found. Consult the readme file."; \ + exit 2; \ + }; \ + woff2_compress $^ >/dev/null; \ + echo "WOFF2 file generated."; \ + }; + + + +# Clean up SVG source +lint: $(svg) + @perl -0777 -pi -e '\ + s/\r\n/\n/g; \ + s/\s*<\/g>//gmi; \ + s/\s*<\/g>//gmi; \ + s/\s+(id|viewBox|xml:space)="[^"]*"/ /gmi; \ + s/]*>//gi; \ + s/<\?xml.*?\?>//gi; \ + s///gm; \ + s/ style="enable-background:.*?;"//gmi; \ + s/"\s+>/">/g; \ + s/\x20{2,}/ /g; \ + s/[\t\n]+//gm;' $^ + + + +# Generate/update character map +$(charmap): + @./create-map.pl -r=$(repo-name) -i=$(icon-folder) --size=$(icon-size) $(font-folder)/$(font-name).svg $@ + + + + +# POSIX systems only: reattach hard links to File-Icons package +relink: + @$(call need-var,ATOM_FILE_ICONS,ERROR_NO_PKG) + @ln -f $(font-folder)/$(font-name).woff2 $(wildcard $(ATOM_FILE_ICONS)/fonts/file-icons-*.woff2) + + + +# Force an icon's preview to be refreshed on GitHub +cachebust: + @$(call need-var,icon,ERROR_NO_ICON) + @base="https://cdn.rawgit.com/Alhadis/FileIcons/"; \ + perl -pi -e 's{$$base\K\w+(?=/svg/$(icon:%.svg=%)\.svg")}{$(last-commit)}ig;' $(charmap) + + +# Dummy task to improve feedback if `cachebust` is mistyped +icon: + $(call need-var,,ERROR_UNDEF_ICON) + + + +# Reset unstaged changes/additions in object directories +clean: + @git clean -fd $(font-folder) + @git checkout -- $(font-folder) 2>/dev/null || true + + +# Delete extracted and generated files +distclean: + @rm -rf $(font-folder) + + +.PHONY: clean distclean $(charmap) cachebust icon +.ONESHELL: + + +# Error message shown to users attempting to run `make relink` without a link +ERROR_NO_PKG := Environment variable ATOM_FILE_ICONS not found. \ + | \ + | Try this instead:\ + | \ + | \ make relink ATOM_FILE_ICONS=/path/to/your/file-icons/installation | + + +# Error message shown when running `make cachebust` without an icon +ERROR_NO_ICON := No icon specified. Task aborted.| \ + | Usage: \ + | \ make icon=file[.svg] cachebust \ + | \ + | Examples: \ + | \ make icon=Manpage cachebust \ + | \ make icon=APL.svg cachebust | + + +# Shown if user tries running `make icon NAME cachebust` by mistake +ERROR_UNDEF_ICON := No task named \"icon\". \ + | \ + | Did you mean this? \ + | \ make icon=NAME cachebust | + + + +# If the given value is empty, die with an error message +need = @$(if $(1),,echo $(subst | ,$$'\n',$(2)); exit 2) + +# Like `need`, but uses variable names instead of string values +need-var = @$(call need,$($(1)),$($(2))) diff --git a/samples/Objective-C/cocoa_monitor.m b/samples/Objective-C/cocoa_monitor.m new file mode 100644 index 00000000..9a384b69 --- /dev/null +++ b/samples/Objective-C/cocoa_monitor.m @@ -0,0 +1,413 @@ +//======================================================================== +// GLFW 3.3 OS X - www.glfw.org +//------------------------------------------------------------------------ +// Copyright (c) 2002-2006 Marcus Geelnard +// Copyright (c) 2006-2016 Camilla Berglund +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would +// be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, and must not +// be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source +// distribution. +// +//======================================================================== + +#include "internal.h" + +#include +#include + +#include +#include +#include +#include + + +// Get the name of the specified display +// +static char* getDisplayName(CGDirectDisplayID displayID) +{ + char* name; + CFDictionaryRef info, names; + CFStringRef value; + CFIndex size; + + // NOTE: This uses a deprecated function because Apple has + // (as of January 2015) not provided any alternative + info = IODisplayCreateInfoDictionary(CGDisplayIOServicePort(displayID), + kIODisplayOnlyPreferredName); + names = CFDictionaryGetValue(info, CFSTR(kDisplayProductName)); + + if (!names || !CFDictionaryGetValueIfPresent(names, CFSTR("en_US"), + (const void**) &value)) + { + // This may happen if a desktop Mac is running headless + _glfwInputError(GLFW_PLATFORM_ERROR, + "Cocoa: Failed to retrieve display name"); + + CFRelease(info); + return strdup("Unknown"); + } + + size = CFStringGetMaximumSizeForEncoding(CFStringGetLength(value), + kCFStringEncodingUTF8); + name = calloc(size + 1, 1); + CFStringGetCString(value, name, size, kCFStringEncodingUTF8); + + CFRelease(info); + + return name; +} + +// Check whether the display mode should be included in enumeration +// +static GLFWbool modeIsGood(CGDisplayModeRef mode) +{ + uint32_t flags = CGDisplayModeGetIOFlags(mode); + if (!(flags & kDisplayModeValidFlag) || !(flags & kDisplayModeSafeFlag)) + return GLFW_FALSE; + + if (flags & kDisplayModeInterlacedFlag) + return GLFW_FALSE; + + if (flags & kDisplayModeStretchedFlag) + return GLFW_FALSE; + + CFStringRef format = CGDisplayModeCopyPixelEncoding(mode); + if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) && + CFStringCompare(format, CFSTR(IO32BitDirectPixels), 0)) + { + CFRelease(format); + return GLFW_FALSE; + } + + CFRelease(format); + return GLFW_TRUE; +} + +// Convert Core Graphics display mode to GLFW video mode +// +static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode, + CVDisplayLinkRef link) +{ + GLFWvidmode result; + result.width = (int) CGDisplayModeGetWidth(mode); + result.height = (int) CGDisplayModeGetHeight(mode); + result.refreshRate = (int) CGDisplayModeGetRefreshRate(mode); + + if (result.refreshRate == 0) + { + const CVTime time = CVDisplayLinkGetNominalOutputVideoRefreshPeriod(link); + if (!(time.flags & kCVTimeIsIndefinite)) + result.refreshRate = (int) (time.timeScale / (double) time.timeValue); + } + + CFStringRef format = CGDisplayModeCopyPixelEncoding(mode); + + if (CFStringCompare(format, CFSTR(IO16BitDirectPixels), 0) == 0) + { + result.redBits = 5; + result.greenBits = 5; + result.blueBits = 5; + } + else + { + result.redBits = 8; + result.greenBits = 8; + result.blueBits = 8; + } + + CFRelease(format); + return result; +} + +// Starts reservation for display fading +// +static CGDisplayFadeReservationToken beginFadeReservation(void) +{ + CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken; + + if (CGAcquireDisplayFadeReservation(5, &token) == kCGErrorSuccess) + CGDisplayFade(token, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0.0, 0.0, 0.0, TRUE); + + return token; +} + +// Ends reservation for display fading +// +static void endFadeReservation(CGDisplayFadeReservationToken token) +{ + if (token != kCGDisplayFadeReservationInvalidToken) + { + CGDisplayFade(token, 0.5, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0.0, 0.0, 0.0, FALSE); + CGReleaseDisplayFadeReservation(token); + } +} + + +////////////////////////////////////////////////////////////////////////// +////// GLFW internal API ////// +////////////////////////////////////////////////////////////////////////// + +// Change the current video mode +// +GLFWbool _glfwSetVideoModeNS(_GLFWmonitor* monitor, const GLFWvidmode* desired) +{ + CFArrayRef modes; + CFIndex count, i; + CVDisplayLinkRef link; + CGDisplayModeRef native = NULL; + GLFWvidmode current; + const GLFWvidmode* best; + + best = _glfwChooseVideoMode(monitor, desired); + _glfwPlatformGetVideoMode(monitor, ¤t); + if (_glfwCompareVideoModes(¤t, best) == 0) + return GLFW_TRUE; + + CVDisplayLinkCreateWithCGDisplay(monitor->ns.displayID, &link); + + modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL); + count = CFArrayGetCount(modes); + + for (i = 0; i < count; i++) + { + CGDisplayModeRef dm = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i); + if (!modeIsGood(dm)) + continue; + + const GLFWvidmode mode = vidmodeFromCGDisplayMode(dm, link); + if (_glfwCompareVideoModes(best, &mode) == 0) + { + native = dm; + break; + } + } + + if (native) + { + if (monitor->ns.previousMode == NULL) + monitor->ns.previousMode = CGDisplayCopyDisplayMode(monitor->ns.displayID); + + CGDisplayFadeReservationToken token = beginFadeReservation(); + CGDisplaySetDisplayMode(monitor->ns.displayID, native, NULL); + endFadeReservation(token); + } + + CFRelease(modes); + CVDisplayLinkRelease(link); + + if (!native) + { + _glfwInputError(GLFW_PLATFORM_ERROR, + "Cocoa: Monitor mode list changed"); + return GLFW_FALSE; + } + + return GLFW_TRUE; +} + +// Restore the previously saved (original) video mode +// +void _glfwRestoreVideoModeNS(_GLFWmonitor* monitor) +{ + if (monitor->ns.previousMode) + { + CGDisplayFadeReservationToken token = beginFadeReservation(); + CGDisplaySetDisplayMode(monitor->ns.displayID, + monitor->ns.previousMode, NULL); + endFadeReservation(token); + + CGDisplayModeRelease(monitor->ns.previousMode); + monitor->ns.previousMode = NULL; + } +} + + +////////////////////////////////////////////////////////////////////////// +////// GLFW platform API ////// +////////////////////////////////////////////////////////////////////////// + +_GLFWmonitor** _glfwPlatformGetMonitors(int* count) +{ + uint32_t i, found = 0, displayCount; + _GLFWmonitor** monitors; + CGDirectDisplayID* displays; + + *count = 0; + + CGGetOnlineDisplayList(0, NULL, &displayCount); + displays = calloc(displayCount, sizeof(CGDirectDisplayID)); + monitors = calloc(displayCount, sizeof(_GLFWmonitor*)); + + CGGetOnlineDisplayList(displayCount, displays, &displayCount); + + for (i = 0; i < displayCount; i++) + { + _GLFWmonitor* monitor; + + if (CGDisplayIsAsleep(displays[i])) + continue; + + const CGSize size = CGDisplayScreenSize(displays[i]); + char* name = getDisplayName(displays[i]); + + monitor = _glfwAllocMonitor(name, size.width, size.height); + monitor->ns.displayID = displays[i]; + monitor->ns.unitNumber = CGDisplayUnitNumber(displays[i]); + + free(name); + + found++; + monitors[found - 1] = monitor; + } + + free(displays); + + *count = found; + return monitors; +} + +GLFWbool _glfwPlatformIsSameMonitor(_GLFWmonitor* first, _GLFWmonitor* second) +{ + // HACK: Compare unit numbers instead of display IDs to work around display + // replacement on machines with automatic graphics switching + return first->ns.unitNumber == second->ns.unitNumber; +} + +void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) +{ + const CGRect bounds = CGDisplayBounds(monitor->ns.displayID); + + if (xpos) + *xpos = (int) bounds.origin.x; + if (ypos) + *ypos = (int) bounds.origin.y; +} + +GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count) +{ + CFArrayRef modes; + CFIndex found, i, j; + GLFWvidmode* result; + CVDisplayLinkRef link; + + *count = 0; + + CVDisplayLinkCreateWithCGDisplay(monitor->ns.displayID, &link); + + modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL); + found = CFArrayGetCount(modes); + result = calloc(found, sizeof(GLFWvidmode)); + + for (i = 0; i < found; i++) + { + CGDisplayModeRef dm = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i); + if (!modeIsGood(dm)) + continue; + + const GLFWvidmode mode = vidmodeFromCGDisplayMode(dm, link); + + for (j = 0; j < *count; j++) + { + if (_glfwCompareVideoModes(result + j, &mode) == 0) + break; + } + + // Skip duplicate modes + if (i < *count) + continue; + + (*count)++; + result[*count - 1] = mode; + } + + CFRelease(modes); + CVDisplayLinkRelease(link); + return result; +} + +void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode *mode) +{ + CGDisplayModeRef displayMode; + CVDisplayLinkRef link; + + CVDisplayLinkCreateWithCGDisplay(monitor->ns.displayID, &link); + + displayMode = CGDisplayCopyDisplayMode(monitor->ns.displayID); + *mode = vidmodeFromCGDisplayMode(displayMode, link); + CGDisplayModeRelease(displayMode); + + CVDisplayLinkRelease(link); +} + +void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) +{ + uint32_t i, size = CGDisplayGammaTableCapacity(monitor->ns.displayID); + CGGammaValue* values = calloc(size * 3, sizeof(CGGammaValue)); + + CGGetDisplayTransferByTable(monitor->ns.displayID, + size, + values, + values + size, + values + size * 2, + &size); + + _glfwAllocGammaArrays(ramp, size); + + for (i = 0; i < size; i++) + { + ramp->red[i] = (unsigned short) (values[i] * 65535); + ramp->green[i] = (unsigned short) (values[i + size] * 65535); + ramp->blue[i] = (unsigned short) (values[i + size * 2] * 65535); + } + + free(values); +} + +void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) +{ + int i; + CGGammaValue* values = calloc(ramp->size * 3, sizeof(CGGammaValue)); + + for (i = 0; i < ramp->size; i++) + { + values[i] = ramp->red[i] / 65535.f; + values[i + ramp->size] = ramp->green[i] / 65535.f; + values[i + ramp->size * 2] = ramp->blue[i] / 65535.f; + } + + CGSetDisplayTransferByTable(monitor->ns.displayID, + ramp->size, + values, + values + ramp->size, + values + ramp->size * 2); + + free(values); +} + + +////////////////////////////////////////////////////////////////////////// +////// GLFW native API ////// +////////////////////////////////////////////////////////////////////////// + +GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* handle) +{ + _GLFWmonitor* monitor = (_GLFWmonitor*) handle; + _GLFW_REQUIRE_INIT_OR_RETURN(kCGNullDirectDisplay); + return monitor->ns.displayID; +} + diff --git a/samples/Pic/dextroamphetamine.chem b/samples/Pic/dextroamphetamine.chem new file mode 100644 index 00000000..8cbe3678 --- /dev/null +++ b/samples/Pic/dextroamphetamine.chem @@ -0,0 +1,13 @@ +# Dextroamphetamine molecule +.cstart + .ps 26 + size 28 +R1: + ring double 1,2 3,4 5,6 + bond 60 from R1.V2 + bond 120 +A1: + front bond down ; CH3 + bond 60 from A1 ; NH2 + .ps +.cend diff --git a/samples/Pic/graph.pic b/samples/Pic/graph.pic new file mode 100644 index 00000000..8534e44e --- /dev/null +++ b/samples/Pic/graph.pic @@ -0,0 +1,25 @@ +.PS + ellipse "Pic" "example" + arrow + box "This is" "a box" + arrow right + box "Another" "box" dashed + move down then right; +Thing: ellipse "This is a" "circle-thing" + arrow <-> from last box.r to Thing.l + move down then left; +B: box "Still a box" + arrow from Thing.l to B.r + sprintf("Width = %g, Height = %g ", B.wid, B.ht) rjust at B.w + move down +.ps 15 + define sadness { + boxwid = 3; + boxht = 1; + textht = .5; + box "\"I run from my depression by" " " "burying myself in code\"" + arrow down from last box.s + "Me" + } + sadness(); +.PE diff --git a/samples/Pic/ritalin.chem b/samples/Pic/ritalin.chem new file mode 100644 index 00000000..a6eb6313 --- /dev/null +++ b/samples/Pic/ritalin.chem @@ -0,0 +1,15 @@ +.\" RITALIN: Methylphenidate Hydrochloride +.cstart +.ps 15 +size 15 + R1: ring double 1,2 3,4 5,6 pointing up + bond 60 length .35 from R1.V2 ; BP + bond 120 length .35 from BP + R2: ring pointing up put N at 1 + H above R2 + bond up length .35 from BP ; BP + bond -60 length .35 from BP ; O + bond up + double bond 60 length .35 from BP ; O +.ps 10 +.cend diff --git a/samples/Python/spec.linux.spec b/samples/Python/spec.linux.spec new file mode 100644 index 00000000..c5806cd3 --- /dev/null +++ b/samples/Python/spec.linux.spec @@ -0,0 +1,22 @@ +a = Analysis(['portablizer.pyqt4.py'], + hiddenimports=[], + hookspath=None, + runtime_hooks=None) +pyz = PYZ(a.pure) +exe = EXE(pyz, + a.scripts, + exclude_binaries=True, + name='Portablizer', + debug=False, + strip=None, + upx=True, + console=False) +node = Tree('node', prefix='node') +collect = COLLECT(exe, + a.binaries, + a.zipfiles, + a.datas, + node, + strip=None, + upx=True, + name='Portablizer') diff --git a/samples/RPM Spec/apache.spec b/samples/RPM Spec/apache.spec new file mode 100644 index 00000000..6e34ba98 --- /dev/null +++ b/samples/RPM Spec/apache.spec @@ -0,0 +1,673 @@ +%define _prefix /usr/local +%define _mandir /usr/local/man +%define _sysconfdir /etc + +%define apache_ver 1.3.42 +%define mod_ssl_ver 2.8.31 +%define mod_perl_ver 1.31 +%define libapreq_ver 1.34 + + +%define aname apache +%define pname httpd13 +%define contentdir %{_var}/www +%define suexec_caller apache + +Summary: The 1.x Apache webserver (with static mod_perl, mod_ssl) +Name: apache +Version: %{apache_ver} +Release: 4%{?dist} +License: Apache Software License 2.0 +URL: http://httpd.apache.org/ +Group: System Environment/Daemons + +Requires: initscripts >= 3.25 +Requires: openssl >= 0.9.6 + +BuildRequires: openssl-devel mm-devel krb5-devel pkgconfig +BuildRequires: perl-ExtUtils-MakeMaker perl-libwww-perl perl-HTML-Parser perl-ExtUtils-Embed +BuildRequires: gdbm-devel flex +Requires: /sbin/chkconfig /bin/mktemp /usr/sbin/useradd +Requires: findutils procps + +Provides: webserver +Provides: mod_perl = %{mod_perl_ver} +Provides: perl(mod_perl) = %{mod_perl_ver} +Provides: mod_ssl = %{mod_ssl_ver} +Provides: apache = %{apache_ver} + +Source0: http://httpd.apache.org/dist/apache_%{apache_ver}.tar.bz2 +Source1: http://www.modssl.org/source/mod_ssl-%{mod_ssl_ver}-%{apache_ver}.tar.gz +Source2: http://perl.apache.org/dist/mod_perl-%{mod_perl_ver}.tar.gz +Source3: httpd.init +Source4: apache.logrotate +Source5: SSL-Certificate-Creation +Source6: ftp://ftp.cpan.org/authors/id/J/JO/JOESUF/libapreq-%{libapreq_ver}.tar.gz + +Patch0: sslcfg.patch +Patch1: apache_1.3.39-config.patch +Patch3: apache_1.3.39-Makefile.patch +Patch5: apache_1.3.20-apachectl-init.patch +Patch11: mod_ssl-2.8.4-openssl.patch +Patch12: apache_1.3.42-db.patch +Patch13: apache-1.3.39-gcc44.patch +Patch14: mod_ssl-2.8.31-STACK.patch +Patch15: apache_1.3.39-ap_getline.patch +Patch16: mod_ssl-openssl-x86_64.patch +Patch17: mp1+perl5.14.diff +Patch18: apache_1.3.42-64bits.patch + + +%description +This package contains a powerful, full-featured, efficient, and +freely-available Web server based on work done by the Apache Software +Foundation. It is also the most popular Web server on the Internet. + +------------------------------------------------------------------------------ +This package is a custom release containing the httpd server (v%{apache_ver}) +bundled with: mod_perl v.%{mod_ssl_ver}, +and mod_ssl v%{mod_ssl_ver}, all BUILT-IN. +------------------------------------------------------------------------------ + + The Apache/Perl integration project brings together the full power +of the Perl programming language and the Apache HTTP server. + With mod_perl it is possible to write Apache modules entirely in Perl. +In addition, the persistent interpreter embedded in the server avoids the +overhead of starting an external interpreter and the penalty of Perl +start-up time. + Mod_SSL provides strong cryptography for the Apache 1.3 webserver +via the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security +(TLSv1) protocols by the help of the Open Source SSL/TLS toolkit OpenSSL. + + +%package devel +Group: Development/Libraries +Summary: Module development tools for apache-mod_ssl +Provides: eapi = %{mod_ssl_ver} +Requires: %{name} = %{version} +Provides: mod_perl-devel = %{mod_perl_ver} +Provides: mod_ssl-devel = %{mod_ssl_ver} +Provides: apache-devel = %{apache_ver} + +%description devel +The apache-devel package contains the APXS binary and other files +that you need to build Dynamic Shared Objects (DSOs) for Apache. +If you are installing the Apache Web server and you want to be able +to compile or develop additional modules for Apache, you need to install +this package. + + +%package manual +Group: Documentation +Summary: Documentation for the Apache Web server + +%description manual +The apache-manual package contains the complete manual and reference +guide for the Apache Web server. +It also contains the basic web content (icons, default welcome messages, +etc) provided with Apache's HTTPD distribution. + + +%prep +%setup -q -c -T -n %{name}-%{version} -a 0 +%setup -q -c -T -D -n %{name}-%{version} -a 1 +%setup -q -c -T -D -n %{name}-%{version} -a 2 +%setup -q -c -T -D -n %{name}-%{version} -a 6 + +pushd %{aname}_%{apache_ver} +%patch0 -p0 -b .sslcfg +%patch1 -p1 -b .config +%patch3 -p0 -b .make +%patch5 -p1 -b .apachectl-init +%ifarch x86_64 +%patch18 -p1 -b .apache-x86_64 +%endif + +#patch12 -p1 -b .dbmdb +%patch13 -p1 -b .compile +%patch15 -p0 -b .ap_getline + + +patch -p0 < ../libapreq-%{libapreq_ver}/patches/apache-1.3+apreq.patch +cp ../libapreq-%{libapreq_ver}/c/*.[ch] src/lib/apreq/ +popd + +pushd mod_ssl-%{mod_ssl_ver}-%{apache_ver} +%patch11 -p1 -b .openssl +%patch14 -p0 -b .stack +%ifarch x86_64 +%patch16 -p1 -b .openssl-x86_64 +%endif +popd + +pushd mod_perl-%{mod_perl_ver} +%patch17 -p1 -b .mp1+perl5.14.diff +popd + +# Substitute values to match the configuration. The first two are +# for the default httpd.conf file, the rest is for the mod_ssl +# additions. +pushd %{aname}_%{apache_ver} +sed -e 's,@@ServerRoot@@,%{_sysconfdir}/%{pname},g' \ + -e 's,@@ContentRoot@@,%{contentdir},g' \ + -e 's,^DocumentRoot "@@ContentRoot@@",#DocumentRoot "%{_sysconfdir}/%{pname}/htdocs",g' \ + -e 's,^,,g' \ + -e 's,^ServerName new.host.name,#ServerName new.host.name,g' \ + -e 's,^ServerAdmin you@your.address,#ServerAdmin you@your.address,g' \ + -e 's,^SSLCipherSuite,#SSLCipherSuite,g' \ + -e 's,^SSLLogLevel info,SSLLogLevel error,g' \ + -e 's,^SSLSessionCache dbm:logs/ssl_scache,SSLSessionCache shm:logs/ssl_scache(512000),g' \ + conf/httpd.conf-dist > conf/httpd.conf +popd + +cp %{SOURCE5} . + +#cp %{_tmppath}/rpm-tmp* /tmp/01prep.sh + +%build +export CFLAGS="$RPM_OPT_FLAGS -fPIC $(pkg-config --cflags openssl)" +export LIBS="-lpthread" +export EAPI_MM=SYSTEM + +############################################### +echo mod_perl ... +pushd mod_perl-%{mod_perl_ver} + perl Makefile.PL CCFLAGS="$RPM_OPT_FLAGS -fPIC" \ + APACHE_SRC=../%{aname}_%{apache_ver}/src \ + DO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 + make %{?_smp_mflags} + ## put mod_perl docs in a safe place ;-]~ + mkdir mod_perl-doc + cp -a eg/ faq/ mod_perl-doc/ + cp {CREDITS,LICENSE,README,SUPPORT,STATUS,Changes,INSTALL*} mod_perl-doc/ + cp *.{pod,html,gif} mod_perl-doc/ + find mod_perl-doc -type f -exec chmod 644 {} \; +popd + +############################################### +echo mod_ssl ... +export SSL_COMPAT=yes +export SSL_EXPERIMENTAL=yes +pushd mod_ssl-%{mod_ssl_ver}-%{apache_ver} + ./configure --with-apache=../apache_%{apache_ver} \ + --with-mm=SYSTEM --force +popd + +############################################### +echo apache ... +pushd %{aname}_%{apache_ver} + ./configure \ + --prefix=%{_prefix} \ + --exec-prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --sbindir=%{_sbindir} \ + --mandir=%{_mandir} \ + --sysconfdir=%{_sysconfdir}/%{pname}/conf \ + --libexecdir=%{_libdir}/apache \ + --datadir=%{contentdir} \ + --iconsdir=%{contentdir}/icons \ + --htdocsdir=%{contentdir}/html \ + --manualdir=%{contentdir}/html/manual \ + --cgidir=%{contentdir}/cgi-bin \ + --localstatedir=%{_localstatedir} \ + --runtimedir=%{_sysconfdir}/%{pname}/run \ + --logfiledir=logs \ + --proxycachedir=%{_localstatedir}/cache/%{pname} \ + --with-perl=%{__perl} \ + --enable-rule=EAPI \ + --enable-rule=SSL_COMPAT \ + --enable-rule=SSL_EXPERIMENTAL \ + --disable-rule=SSL_VENDOR \ + --disable-rule=WANTHSREGEX \ + --disable-rule=EXPAT \ + %{?_with_backtrace:--activate-module=src/modules/experimental/mod_backtrace.c} \ + %{?_with_whatkilledus:--activate-module=src/modules/experimental/mod_whatkilledus.c} \ + --activate-module=src/modules/perl/libperl.a \ + --enable-module=auth_dbm \ + --enable-module=ssl \ + --enable-module=all \ + --enable-shared=max \ + --disable-shared=perl \ + --disable-shared=ssl \ + --disable-module=example \ + --disable-module=auth_db \ + --without-execstrip \ + %{?_with_suexec:--enable-suexec --suexec-docroot=%{contentdir}} \ + %{?_with_suexec:--suexec-uidmin=300 --suexec-gidmin=300} \ + %{?_with_suexec:--suexec-umask=022 --suexec-caller=%{suexec_caller}} + + make %{?_smp_mflags} + +popd +#cp %{_tmppath}/rpm-tmp* /tmp/02build.sh + +%install +############################################################################### +### install basic apache stuff +pushd apache_%{apache_ver} + make install root="$RPM_BUILD_ROOT" +popd + +### rename +mv $RPM_BUILD_ROOT%{_sbindir}/httpd $RPM_BUILD_ROOT%{_sbindir}/%{pname} + +### install SYSV init stuff +mkdir -p $RPM_BUILD_ROOT%{_initrddir} +install -m755 %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/%{pname} + +### install log rotation stuff +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +install -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/apache + +### default rootdir links +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{pname} +pushd $RPM_BUILD_ROOT%{_sysconfdir}/%{pname} + ln -s %{_localstatedir}/log/%{pname} logs + ln -s %{_libdir}/%{aname} modules + ln -s %{_localstatedir}/run run +popd + +### replace Apache's default config file with our patched version +install -m644 apache_%{apache_ver}/conf/httpd.conf \ + $RPM_BUILD_ROOT%{_sysconfdir}/%{pname}/conf/httpd.conf + +# fix up apxs so that it doesn't think it's in the build root +perl -pi -e "s^$RPM_BUILD_ROOT^^g" $RPM_BUILD_ROOT%{_sbindir}/apxs + +# fixup the documentation file naming +find $RPM_BUILD_ROOT%{contentdir} -name "*.html.html" | xargs rename .html.html .html + +############################################################################### +### install mod_perl files +pushd mod_perl-%{mod_perl_ver} + export PERL_INSTALL_ROOT=$RPM_BUILD_ROOT + make pure_install PREFIX=/usr INSTALLDIRS=vendor + + # convert man pages to UTF-8 + recode() { + iconv -f "$2" -t utf-8 < "$1" > "${1}_" + %{__mv} -f "${1}_" "$1" + } + pushd $RPM_BUILD_ROOT/usr/share/man/man3/ + for i in * ; do + recode "${i}" iso-8859-1 + done + popd + + # fix files mod + find $RPM_BUILD_ROOT%{perl_vendorarch} -iname '*.pm' -exec chmod 0644 {} \; + + # bake web docs... + mkdir -p $RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_perl + install -c -m 644 htdocs/manual/mod/mod_perl.html \ + $RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_perl/ + make -C faq + rm -f faq/pod2htm* + install -m644 faq/*.html \ + $RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_perl/ + +popd + +# remove special perl files this is specific for rpms , already have in own .packlist +find $RPM_BUILD_ROOT%{perl_vendorarch}/.. -name perllocal.pod -o -name .packlist \ + -o -name '*.bs' | xargs -r -i rm -f {} + +### ssl leftovers +# point to the right makefile. +ln -sf ../../../etc/pki/tls/certs/Makefile $RPM_BUILD_ROOT%{_sysconfdir}/%{pname}/conf +# create a prototype session cache +touch $RPM_BUILD_ROOT%{_localstatedir}/cache/ssl_gcache_data.{dir,pag,sem} + +# drop shellbang from .exp files +for exp in $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Apache/mod_perl.exp $RPM_BUILD_ROOT%{_libdir}/%{aname}/httpd.exp +do + sed -i '/^#!/ d' $exp +done + +#cp %{_tmppath}/rpm-tmp* /tmp/03install.sh + +%post +/sbin/chkconfig --add %{pname} +/sbin/ldconfig + +# safely build a test certificate +umask 077 +if [ ! -f %{_sysconfdir}/%{pname}/conf/ssl.key/server.key ] ; then +openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/%{pname}/conf/ssl.key/server.key 2> /dev/null +fi + +if [ ! -f %{_sysconfdir}/%{pname}/conf/ssl.crt/server.crt ] ; then +cat << EOF | openssl req -new -key %{_sysconfdir}/%{pname}/conf/ssl.key/server.key -x509 -days 365 -out %{_sysconfdir}/%{pname}/conf/ssl.crt/server.crt 2>/dev/null +-- +SomeState +SomeCity +SomeOrganization +SomeOrganizationalUnit +localhost.localdomain +root@localhost.localdomain +EOF +fi + +# safely add .htm to mime types if it is not already there +[ -f %{_sysconfdir}/mime.types ] || exit 0 +TEMPTYPES=`/bin/mktemp /tmp/mimetypes.XXXXXX` +[ -z "$TEMPTYPES" ] && { + echo "could not make temporary file, htm not added to %{_sysconfdir}/mime.types" >&2 + exit 1 +} +( grep -v "^text/html" %{_sysconfdir}/mime.types + types=$(grep "^text/html" %{_sysconfdir}/mime.types | cut -f2-) + echo -en "text/html\t\t\t" + for val in $types ; do + if [ "$val" = "htm" ] ; then + continue + fi + echo -n "$val " + done + echo "htm" +) > $TEMPTYPES +cat $TEMPTYPES > %{_sysconfdir}/mime.types && /bin/rm -f $TEMPTYPES + +cp %{_tmppath}/rpm-tmp* /tmp/04post.sh + +%pre +# Add the "apache" user +/usr/sbin/useradd -c "Apache" -u 48 \ + -s /sbin/nologin -r -d "%{contentdir}" apache 2> /dev/null || : + +%preun +if [ $1 = 0 ]; then + if [ -f /var/lock/subsys/%{pname} ]; then + %{_initrddir}/%{pname} stop + fi + if [ -f %{_initrddir}/%{pname} ]; then + /sbin/chkconfig --del %{pname} + fi +fi + +%files +%defattr(-,root,root) +%dir %{_sysconfdir}/%{pname} +%dir %{_sysconfdir}/%{pname}/conf +%config(noreplace) %{_sysconfdir}/%{pname}/conf/*.conf +%config(noreplace) %{_sysconfdir}/%{pname}/conf/Makefile +%config(noreplace) %{_sysconfdir}/%{pname}/conf/magic +%config(noreplace) %{_sysconfdir}/%{pname}/conf/mime.types +%config(noreplace) %{_sysconfdir}/logrotate.d/* +%config(noreplace) %{_sysconfdir}/%{pname}/conf/ssl.* +%doc %{_sysconfdir}/%{pname}/conf/*.default +%attr(755,root,root) %{_initrddir}/* +%{_sysconfdir}/%{pname}/logs +%{_sysconfdir}/%{pname}/modules +%{_sysconfdir}/%{pname}/run +%{_libdir}/%{aname} +%{perl_vendorarch}/Apache +%{perl_vendorarch}/Bundle +%{perl_vendorarch}/*.pm +%{perl_vendorarch}/*.PL +%dir %{perl_vendorarch}/auto/Apache +%{perl_vendorarch}/auto/Apache/Leak +%{perl_vendorarch}/auto/Apache/Symbol +%{perl_vendorarch}/auto/Apache/mod_perl.exp +%{perl_vendorarch}/auto/Apache/typemap +%attr(0755,root,root) %{_bindir}/* +%attr(0755,root,root) %{_sbindir}/ab +%attr(0755,root,root) %{_sbindir}/apachectl +%attr(0755,root,root) %{_sbindir}/httpd13 +%attr(0755,root,root) %{_sbindir}/logresolve +%attr(0755,root,root) %{_sbindir}/rotatelogs +%{?_with_suexec:%attr(4710,root,%{suexec_caller}) %{_sbindir}/suexec} +%{_mandir}/man1*/* +%{_mandir}/man8/ab.8* +%{_mandir}/man8/apachectl.8* +%{_mandir}/man8/httpd.8* +%{_mandir}/man8/logresolve.8* +%{_mandir}/man8/rotatelogs.8* +%{?_with_suexec:%{_mandir}/man8/suexec.8*} +%attr(0755,apache,root) %dir %{_localstatedir}/cache/%{pname} +%attr(0640,apache,root) %{_localstatedir}/cache/ssl_* +%attr(0750,root,apache) %dir %{_localstatedir}/log/%{pname} + + +%files devel +%defattr(-,root,root) +%{_includedir} +%attr(0755,root,root) %{_sbindir}/apxs +%{_mandir}/man8/apxs.8* +%doc %{perl_vendorarch}/*.pod +%{perl_vendorarch}/auto/Apache/include + +%files manual +%defattr(-,root,root) +%doc apache_%{apache_ver}/cgi-bin +%dir %{contentdir} +%dir %{contentdir}/cgi-bin +%config(noreplace) %{contentdir}/cgi-bin/* +%dir %{contentdir}/html +%config(noreplace) %{contentdir}/html/*.html* +%config(noreplace) %{contentdir}/html/*.gif +%dir %{contentdir}/icons +%dir %{contentdir}/icons/small +%config(noreplace) %{contentdir}/icons/*.* +%config(noreplace) %{contentdir}/icons/small/*.* +%doc %{contentdir}/icons/README + +%doc apache_%{apache_ver}/{ABOUT_APACHE,LICENSE*,NOTICE,README*,cgi-bin} +%doc apache_%{apache_ver}/src/{CHANGES,README}* +%doc mod_ssl-%{mod_ssl_ver}-%{apache_ver}/README.* +%doc mod_ssl-%{mod_ssl_ver}-%{apache_ver}/NEWS +%doc mod_perl-%{mod_perl_ver}/mod_perl-doc +%doc SSL-Certificate-Creation + +%doc %{contentdir}/html/manual +%exclude %{contentdir}/html/manual/mod/mod_ssl/ssl_cover.wml +#man3 conflicts with mod_perl2 +/usr/share/man/man3*/* + + +%changelog +* Sun May 13 2012 Sérgio Basto - 1.3.42-4 +- Many improvements on defaults directories +- Separate libapreq in other package, to compile libapreq is need other sources installed. +- more cleanups. + +* Wed Nov 16 2011 Sérgio Basto +- build for F16 +- mp1+perl5.14.diff (mod_perl1 + perl5.14) +- many improvents. + +* Sat Oct 29 2011 Sérgio Basto +- mock build add many buildrequires +- many improvemts on confs + +* Tue Oct 16 2007 Sérgio Basto +- UNDROPPED CONFIGURATION COMPLETELY: rpm it suposed do all alone. +- rename httpd to http13 to work independently of apache 2.2 +- add patch to Makefile.tmp, resolve all problems at once +- change server port number to run out of the box. +- Update link to certs/Makefile. + +* Tue Sep 11 2007 Marius FERARU - 1.3.39-1.n0i.23.MPSSL +- apache 1.3.39 +- mod_ssl 2.8.29 + +* Mon Apr 02 2007 Marius FERARU - 1.3.37-3.n0i.22.MPSSL +- mod_perl 1.30 +- initscript: use a "$pidfile" variable for all operations +- initscript: added a dummy "alias" for "reload" (will do a 'restart'!) +- initscript: added missing "fullstatus" option (will run through "apachectl") +- dropped shellbang from .exp files +- dropped 2 explicit provides (mod_perl and Apache::Constants) + +* Fri Sep 08 2006 Marius FERARU - 1.3.37-2.n0i.21.MPSSL +- BR: gdbm-devel, db4-devel + +* Mon Aug 21 2006 Marius FERARU - 1.3.37-1.n0i.20.MPSSL +- apache 1.3.37 +- mod_ssl 2.8.28 +- Dist macro +- URL update +- updated description +- spec cleanups +- use "--with backtrace" to activate "mod_backtrace" +- use "--with whatkilledus" to activate "mod_whatkilledus" +- use "--with suexec" to activate suexec functionality +- moved default web content into documentation package + +* Tue Jun 06 2006 Marius FERARU - 1.3.36-2.n0i.19.MPSSL +- changed "runtimedir" and "logfiledir" to relative paths, + letting users run apache on their own + +* Tue Jun 06 2006 Marius FERARU - 1.3.36-1.n0i.19.MPSSL +- apache 1.3.36 +- mod_ssl version 2.8.27 +- spec cleanups + +* Mon Mar 13 2006 Marius FERARU - 1.3.34-2.n0i.18.MPSSL +- rebuild + +* Thu Nov 24 2005 Marius FERARU 1.3.34-1.n0i.17.MPSSL +- apache 1.3.34 +- mod_ssl version 2.8.25 + +* Tue Sep 20 2005 Marius FERARU 1.3.33-5.n0i.16.MPSSL +- mod_ssl version 2.8.24 + +* Fri Sep 02 2005 Marius FERARU 1.3.33-4.n0i.15.MPSSL +- rebuild +- dropped more requirements (which Fedora considers to "always have") + +* Sat Jul 23 2005 Marius FERARU 1.3.33-3.n0i.14.MPSSL +- dropped Epoch +- changed Summary and Description +- rebuild (perl 5.8.7) + +* Tue Jan 04 2005 Marius FERARU 1.3.33-2.n0i.13.MPSSL +- libapreq version 1.33 + +* Mon Dec 06 2004 Marius FERARU 1.3.33-1.n0i.12.MPSSL +- apache version 1.3.33 +- mod_ssl version 2.8.22 +- description update + +* Tue Aug 17 2004 Marius FERARU 1.3.31-5.n0i.11.MPSSL +- mod_ssl version 2.8.19 + +* Thu Jul 15 2004 Marius FERARU 1.3.31-4.n0i.10.MPSSL +- mod_ssl version 2.8.18 + +* Tue Jul 13 2004 Marius FERARU 1.3.31-3.n0i.9.MPSSL +- tweaked rotatelog's build: drop linking with apache libs + +* Tue Jul 13 2004 Marius FERARU 1.3.31-2.n0i.8.MPSSL +- applied some fixing patches from current CVS version + +* Thu May 13 2004 Marius FERARU 1.3.31-1.n0i.7.MPSSL +- apache version 1.3.31 +- mod_ssl version 2.8.17 +- updated apxs patch +- slight spec tweaks +- enabled backtrace experimental module +- updated config patch + +* Fri Apr 30 2004 Marius Feraru 1.3.29-6.n0i.6.MPSSL +- automatic rebuild + +* Thu Apr 22 2004 Marius FERARU 1.3.29-5.n0i.5.MPSSL +- rebuild (perl 5.8.4) + +* Tue Feb 10 2004 Marius FERARU 1.3.29-4.n0i.4.MPSSL +- fixed the shameful bugs from my httpd.init script + +* Fri Jan 23 2004 Marius FERARU 1.3.29-3.n0i.3.MPSSL +- rebuild (perl 5.8.3) + +* Fri Jan 16 2004 Marius FERARU 1.3.29-2.n0i.2.MPSSL +- rebuilt on perl 5.8.2 / Fedora 1 Devel (tobe FC2) +- finally clearly enabled modperl.c in apache_1.3.23-config.patch +as many helpless people seem to use this dumb default configuration file :( +- also updated the same patch to properly define SSL too :) +- added a lame "MPSSL" extra tag in release to make people understand this +is a !SPECIAL! apache + mod_perl + mod_ssl + libapreq package suite!!! +- updated init script to do "real" server shutdown (in squid style) and to NOT +shutdown all the apache servers, just the one started with /var/run/httpd.pid +- added USE_MODULEARGS=[yes/no] and SHUTDOWN_TIMEOUT=[seconds] configuration +parameters to init script + +* Thu Nov 13 2003 Marius FERARU 1.3.29-1.n0i.1 +- apache 1.3.29 +- modssl 2.8.16 +- dropped zombie patch +- dropped fderr patch +- dropped for good thttpd conflict note as THERE IS NO CONFLICT!!! In fact +we really use them both for long time without a problem :)) +- added more Prereq stuff +- more Fedora style spec updates + +* Thu Oct 16 2003 Marius FERARU 1.3.28-2.n0i +- mod_perl 1.29 +- libapreq 1.3 +- replaced ALL direct 'etc' occurences to macros (some for other stuff) +- perl %%files are now more properly quested. +- switched krb5-config to pkg-config +- switched textutils to coreutils +- using mm 1.3 +- disabled internal expat linking +- added the 'zombie' patch +- added the 'file descriptors are erroneously closed' patch + +* Mon Jul 28 2003 Marius FERARU 1.3.28-1.n0i +- mod_perl 1.28 +- added builtin libapreq + +* Fri Jul 25 2003 Marius FERARU 1.3.28-0.n0i +- apache version 1.3.28 +- mod_ssl version 2.8.15 +- switched the old dbm-gdbm patch with a more elegant one (apache_1.3.27-db); +yet, more tests are to be done on other systems before dropping the old one +from our src.rpm +- disabled suexec SSL env support patch as Apache ppl changed their code heavily +and I do not yet have time to update this patch +- moved mod_perl header files into apache-devel (are they needed by someone?!) +- dropped using RPM_SOURCE_DIR/ stuff. +- disabled auth_db module (db4 API changes?!) + +* Mon Apr 21 2003 Marius FERARU 1.3.27-2.n0i +- automatic rebuild on RHL9 + +* Wed Mar 26 2003 Marius FERARU 1.3.27-1.n0i +- mod_ssl version 2.8.14 +- dropped thttpd conflict note as THERE IS NO CONFLICT!!! In fact we really +use them both :)) + +* Fri Oct 18 2002 Marius Feraru +- apache version 1.3.27 +- mod_ssl version 2.8.11 +- eliminated db4 patch +- disabled thttpd conflict flag + +* Tue Sep 24 2002 Marius Feraru +- automatic rebuild (to conform with the openssl update) + +* Wed Sep 4 2002 Marius Feraru +- some spec cleanups (rpm 4.1.x compatibility) + +* Tue Jul 23 2002 Marius FERARU +- apache 1.3.26 +- mod_perl 1.27 +- mod_ssl 2.8.10 +- lots of new tweaks to the spec file (hopefully it will be easier now for others to +rebuild this package =] ) + + +* Sat Sep 1 2001 Marius FERARU +- updated apache to 1.3.22 +- reparsed and tweaked all RedHat patches +- lots of spec file tweaks: optimisations, + file location/integration/modes fixes... + +* Sat Sep 1 2001 Marius FERARU +- updated mod_perl to version 1.26 +- based on apache-1.3.20-15.src.rpm from Red Hat RawHide +- used apache_modperl-1.3.19-1.24-1.src.rpm from + perl.apache.org as example spec. diff --git a/samples/RPM Spec/erlang-erlydtl.spec b/samples/RPM Spec/erlang-erlydtl.spec new file mode 100644 index 00000000..eea3fb2b --- /dev/null +++ b/samples/RPM Spec/erlang-erlydtl.spec @@ -0,0 +1,62 @@ +%global debug_package %{nil} + +Name: erlang-erlydtl +Version: 0.6.0 +Release: 1%{?dist} +Summary: Erlang implementation of the Django Template Language. + +Group: Development/Libraries +License: MIT +URL: http://code.google.com/p/erlydtl/ +Source0: http://erlydtl.googlecode.com/files/erlydtl-0.6.0.tar.gz +Patch0: erlang-erlydtl-0.6.0-tests.patch +Patch1: erlang-erlydtl-0.6.0-r14a.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Provides: ErlyDTL = %{version}-%{release} +BuildRequires: erlang +Requires: erlang + +%description +ErlyDTL is an Erlang implementation of the Django Template Language. The +erlydtl module compiles Django Template source code into Erlang bytecode. The +compiled template has a "render" function that takes a list of variables and +returns a fully rendered document + +%prep +%setup -q -n erlydtl-%{version} +find examples/ -type f -executable -exec chmod -x {} \; + +%patch0 -p0 +%patch1 -p0 + +%build +make %{?_smp_mflags} + +%check +make test + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/ +cp -r ebin %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/ +cp -r bin %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/ +cp -r priv %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/ + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%dir %{_libdir}/erlang/lib/erlydtl-%{version} +%{_libdir}/erlang/lib/erlydtl-%{version}/* +%doc README +%doc examples + + +%changelog +* Sun Aug 1 2010 Ilia Cheishvili - 0.6.0-1 +- Initial Package diff --git a/samples/RPM Spec/manos.spec b/samples/RPM Spec/manos.spec new file mode 100644 index 00000000..5674d3ce --- /dev/null +++ b/samples/RPM Spec/manos.spec @@ -0,0 +1,46 @@ +# +# spec file for package manos +# +# Copyright (c) 2010 Jackson Harper (jackson@novell.com) +# +# + +Name: manos-devel +Version: 0.1.1 +Release: 1 +License: MIT/X11 +BuildRoot: %{_tmppath}/manos-%{version}-build +BuildRequires: mono-devel >= 2.6 +BuildRequires: mono-nunit >= 2.6 +Source0: manos-%{version}.tar.bz2 +Source1: rpmlintrc +Summary: The Manos Web Application Framework +Group: Development/Web/Servers +BuildArch: noarch + +%description +Manos is an easy to use, easy to test, high performance web application framework that stays out of your way and makes your life ridiculously simple. + +%files +%defattr(-, root, root) +%{_prefix}/lib/manos +%{_bindir}/manos +%{_datadir}/manos +%{_prefix}/lib/pkgconfig/manos.pc +%{_datadir}/man/man1/manos.1.gz + +%prep +%setup -q -n manos-%{version} + + +%build +./configure --prefix=%{buildroot}%{_prefix} --install-prefix=%{_prefix} +make + +%install +make install + +%clean +rm -rf %{buildroot} + +%changelog \ No newline at end of file diff --git a/samples/Ruby/any.spec b/samples/Ruby/any.spec new file mode 100644 index 00000000..50188314 --- /dev/null +++ b/samples/Ruby/any.spec @@ -0,0 +1,44 @@ +require File.dirname(File.expand_path(__FILE__)) + '/../spec_helper' + +describe Spira::Types::Any do + + before :all do + @uri = RDF::URI('http://example.org') + end + + # this spec is going to be necessarily loose. The 'Any' type is defined to + # use RDF.rb's automatic RDF Literal boxing and unboxing, which may or may + # not change between verions. + # + context "when serializing" do + it "should serialize literals to RDF Literals" do + serialized = Spira::Types::Any.serialize(15) + serialized.should be_a RDF::Literal + serialized = Spira::Types::Any.serialize("test") + serialized.should be_a RDF::Literal + end + + it "should keep RDF::URIs as URIs" do + Spira::Types::Any.serialize(@uri).should == @uri + end + + it "should fail to serialize collections" do + lambda { Spira::Types::Any.serialize([]) }.should raise_error TypeError + end + end + + context "when unserializing" do + it "should unserialize to ruby types" do + value = Spira::Types::Any.unserialize(RDF::Literal.new(5, :datatype => RDF::XSD.integer)) + value.should == 5 + value = Spira::Types::Any.unserialize(RDF::Literal.new("a string")) + value.should == "a string" + end + + it "should unserialize URIs to URIs" do + Spira::Types::Any.unserialize(@uri).should == @uri + end + end + + +end diff --git a/samples/Sublime Text Config/AMPL.sublime-build b/samples/Sublime Text Config/AMPL.sublime-build new file mode 100644 index 00000000..7434f54d --- /dev/null +++ b/samples/Sublime Text Config/AMPL.sublime-build @@ -0,0 +1,14 @@ +{ + "cmd": ["ampl", "${file_path}/${file_base_name}.run"], + "file_regex": "^(?:[(]file )*[ ]*(...*?), line ([0-9]*)", + "selector": "source.ampl", + + "osx": + { + "env": + { + // "ILOG_LICENSE_FILE": "path/to/access.ilm" + } + } + +} diff --git a/samples/Sublime Text Config/CLIPS.sublime-settings b/samples/Sublime Text Config/CLIPS.sublime-settings new file mode 100644 index 00000000..1b6ef5f3 --- /dev/null +++ b/samples/Sublime Text Config/CLIPS.sublime-settings @@ -0,0 +1,8 @@ +{ + "extensions": + [ + "clp" + ], + "tab_size": 8, + "translate_tabs_to_spaces": false +} diff --git a/samples/Sublime Text Config/Context.sublime-menu b/samples/Sublime Text Config/Context.sublime-menu new file mode 100644 index 00000000..ae2526e5 --- /dev/null +++ b/samples/Sublime Text Config/Context.sublime-menu @@ -0,0 +1,13 @@ +[ +{ + "id" : "nasm", + "caption": "NASM Assembly", + "children": + [ + { + "caption" : "Documentation", + "command" : "assembly_doc" + } + ] +} +] \ No newline at end of file diff --git a/samples/Sublime Text Config/Dart.sublime-commands b/samples/Sublime Text Config/Dart.sublime-commands new file mode 100644 index 00000000..901bbdfe --- /dev/null +++ b/samples/Sublime Text Config/Dart.sublime-commands @@ -0,0 +1,30 @@ +[ + { "caption": "Dart: Polymer: Generate Element", "command": "dart_generate_polymer_element" }, + { "caption": "Dart: Polymer: Add Entry Point", "command": "dart_add_polymer_entry_point" }, + + { "caption": "Dart: Check Configuration", "command": "dart_check_config" }, + { "caption": "Dart: Browse API Reference", "command": "dart_open_browser", "args": {"url": "https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/home" } }, + { "caption": "Dart: Set Default User Browser", "command": "dart_show_user_browsers" }, + + { "caption": "Preferences: Dart Settings - Default", "command": "dart_open_settings", "args": {"kind": "default"} }, + { "caption": "Preferences: Dart Settings - User", "command": "dart_open_settings", "args": {"kind": "user"} }, + { "caption": "Preferences: Dart Settings - File Type (User)", "command": "dart_open_settings", "args": {"kind": "user", "scope": "file_type"} }, + + { "caption": "Dart: Run", "command": "dart_smart_run" }, + { "caption": "Dart: Run (This File)", "command": "dart_smart_run", "args": {"force_update": true} }, + { "caption": "Dart: Stop", "command": "dart_smart_run", "args": {"kill_only": true} }, + + { "caption": "Dart: Run In Observatory (This File)", "command": "dart_run_in_observatory" }, + + { "caption": "Dart: Show Output Panel", "command": "show_panel", "args": {"panel": "output.dart.out"} }, + { "caption": "Dart: Show Errors Panel", "command": "show_panel", "args": {"panel": "output.dart.errors"} }, + + { "caption": "Dart: Format", "command": "dart_format" }, + + { "caption": "Dart: Generate Documentation", "command": "dart_generate_docs" }, + { "caption": "Dart: Serve Documentation", "command": "dart_serve_docs" }, + + { "caption": "Dart: Stagehand", "command": "dart_stagehand_wizard" }, + + { "caption": "Dart: Pub Get", "command": "dart_pub_get" } +] diff --git a/samples/Sublime Text Config/Dart.sublime-project b/samples/Sublime Text Config/Dart.sublime-project new file mode 100644 index 00000000..22c1677a --- /dev/null +++ b/samples/Sublime Text Config/Dart.sublime-project @@ -0,0 +1,40 @@ +{ + "folders": + [ + { + "follow_symlinks": true, + "path": "." + } + ], + + "SublimeLinter": + { + "@python": 3.4 + }, + + "build_systems": + [ + { + "name": "Run", + "shell_cmd": "\"$project_path/scripts/build.sh\"", + "windows": + { + "shell_cmd": "powershell -noninteractive -file \"$project_path\\build.ps1\"" + }, + "working_dir": "${project_path}", + + "variants": [ + { + "name": "Dart: Test (All)", + "target": "run_dart_tests", + }, + + { + "name": "Dart: Test (This File Only)", + "target": "run_dart_tests", + "active_file_only": true + } + ] + } + ] +} diff --git a/samples/Sublime Text Config/Default (Linux).sublime-mousemap b/samples/Sublime Text Config/Default (Linux).sublime-mousemap new file mode 100644 index 00000000..c6d56aa5 --- /dev/null +++ b/samples/Sublime Text Config/Default (Linux).sublime-mousemap @@ -0,0 +1,7 @@ +[ + { + "button": "button1", "count": 1, "modifiers": ["alt"], + "press_command": "drag_select", + "command": "robot_go_to_keyword" + } +] diff --git a/samples/Sublime Text Config/Default.sublime-keymap b/samples/Sublime Text Config/Default.sublime-keymap new file mode 100644 index 00000000..e62a0a9b --- /dev/null +++ b/samples/Sublime Text Config/Default.sublime-keymap @@ -0,0 +1,6 @@ +[ + // Disable auto-pair for single quote + { "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'"}, "context": + [{ "key": "selector", "operator": "equal", "operand": "source.rust" }] + } +] diff --git a/samples/Sublime Text Config/JavaDoc Add Line.sublime-macro b/samples/Sublime Text Config/JavaDoc Add Line.sublime-macro new file mode 100644 index 00000000..a2d62b99 --- /dev/null +++ b/samples/Sublime Text Config/JavaDoc Add Line.sublime-macro @@ -0,0 +1,6 @@ +[ + {"command": "move_to", "args": {"to": "hardeol"}}, + {"command": "insert", "args": {"characters": "\n"}}, + {"command": "insert", "args": {"characters": "*"}}, + {"command": "insert", "args": {"characters": " "}} +] diff --git a/samples/Sublime Text Config/RunBuild.sublime-macro b/samples/Sublime Text Config/RunBuild.sublime-macro new file mode 100644 index 00000000..574a045d --- /dev/null +++ b/samples/Sublime Text Config/RunBuild.sublime-macro @@ -0,0 +1,5 @@ +[ + { + "command": "haxe_run_build" + } +] diff --git a/samples/Sublime Text Config/SourcePawn.sublime-build b/samples/Sublime Text Config/SourcePawn.sublime-build new file mode 100644 index 00000000..013a949d --- /dev/null +++ b/samples/Sublime Text Config/SourcePawn.sublime-build @@ -0,0 +1,19 @@ +{ + // For default sourcemod scripting directory : + "cmd": ["", "-o$file_path/../plugins/$file_name", "$file"], + + // For custom sourcemod scripting directory : + "cmd": ["", "-i", "-o$file_path/$file_base_name.smx", "$file"], + + // Windows example: + "cmd": ["X:/somefolder/spcomp", "-iX:/somefolder", "-o$file_path/$file_base_name.smx", "$file"], + "cmd": ["X:/game/csgo/addons/sourcemod/scripting/spcomp", "-o$file_path/../plugins/$file_name", "$file"], + + // Linux or OSX example: + "cmd": ["/home/User/sm/spcomp", "-i/home/User/sm/include", "-o$file_path/$file_base_name.smx", "$file"], + "cmd": ["/home/User/game/csgo/addons/sourcemod/scripting/spcomp", "-o$file_path/../plugins/$file_name", "$file"], + + + "file_regex": "(.*)\\((\\d+)\\) :", + "selector": "source.sp" +} diff --git a/samples/Sublime Text Config/Tubnil.sublime-theme b/samples/Sublime Text Config/Tubnil.sublime-theme new file mode 100644 index 00000000..cb494beb --- /dev/null +++ b/samples/Sublime Text Config/Tubnil.sublime-theme @@ -0,0 +1,861 @@ +[ + // Tubnil theme for Sublime Text 2 + // https://github.com/nilium/st2-nil-theme + // + // TABS + // ========================================================== + // - Tabset + // ------------------------------------------------------ + { + "class": "tabset_control", + "layer0.texture": "SourcePawn/assets/tabset-bg.png", + "layer0.inner_margin": [2, 6], + "layer0.opacity": 1.0, + "content_margin": [-13, 0, -13,-6], // left, top, right, bottom + "tab_overlap": 25, + "tab_width": 150, + "tab_min_width": 50, + "tab_height": 35, + "mouse_wheel_switch": false + }, + { + "class": "tabset_control", + "settings": ["mouse_wheel_switches_tabs"], + "mouse_wheel_switch": true + }, + + // - Tab element + // ------------------------------------------------------ + { + "class": "tab_control", + "content_margin": [25, 0, 25, 0], + "max_margin_trim": 0, + "hit_test_level": 0.5, + + // - Inactive tab settings + "layer0.texture": "SourcePawn/assets/tab-inactive.png", + "layer0.inner_margin": [23, 8], + "layer0.opacity": 1.0, + + // - Active tab setting + "layer1.texture": "SourcePawn/assets/tab-active.png", + "layer1.inner_margin": [23, 8], + "layer1.opacity": 0.0, + + // - Hover tab setting + "layer2.texture": "SourcePawn/assets/tab-hover.png", + "layer2.inner_margin": [23, 8], + "layer2.opacity": 0.0 + }, + { + // - Tab close state + "class": "tab_control", + "settings": ["show_tab_close_buttons"], + "content_margin": [20, 0, 20, 7] + }, + { + // - Hover tab state + "class": "tab_control", + "attributes": ["hover"], + "layer2.opacity": 1.0 + }, + { + // - Active tab state + "class": "tab_control", + "attributes": ["selected"], + "layer0.opacity": 0.0, + "layer1.opacity": 1.0, + "layer2.opacity": 0.0 + }, + { + // - Modified tab state + "class": "tab_control", + //"settings": ["highlight_modified_tabs"], + "attributes": ["dirty"], + "layer0.texture": "SourcePawn/assets/tab-inactive-modified.png", + "layer1.texture": "SourcePawn/assets/tab-active-modified.png", + "layer2.texture": "SourcePawn/assets/tab-hover-dirty.png" + }, + + // - Tab labels + // ------------------------------------------------------ + + // - Inactive tab label + { + "class": "tab_label", + "fg": [180, 180, 180], + "shadow_color": [0, 0, 0, 200], + "shadow_offset": [0, 1] + }, + + // - Active tab label + { + "class": "tab_label", + "parents": [{"class": "tab_control", "attributes": ["selected"]}], + "shadow_color": [0, 0, 0, 165], + "shadow_offset": [0, 1], + "fg": [240, 240, 240, 255] + }, + + // - Hover tab label + { + "class": "tab_label", + "parents": [{"class": "tab_control", "attributes": ["hover"]}], + "shadow_color": [0, 0, 0, 165], + "shadow_offset": [0, 1], + "fg": [2, 196, 251, 255] + }, + + // - Dirty Hover tab label + { + "class": "tab_label", + "parents": [{"class": "tab_control", "attributes": ["hover", "dirty"]}], + "shadow_color": [0, 0, 0, 165], + "shadow_offset": [0, 1], + "fg": [253, 113, 1, 255] + }, + + // - Dirty inactive tab label + { + "class": "tab_label", + "parents": [{"class": "tab_control", "attributes": ["dirty"]}], + "settings": ["highlight_modified_tabs"] + }, + + // - Dirty active tab label + { + "class": "tab_label", + "parents": [{"class": "tab_control", "attributes": ["selected", "dirty"]}], + "settings": ["highlight_modified_tabs"] + }, + + // - Tab buttons + // ------------------------------------------------------ + + // - Tab button + { + "class": "tab_close_button", + "content_margin": [0, 0], + + // - Tab close default settings + "layer1.texture": "SourcePawn/assets/tab-button-close.png", + "layer1.opacity": 0.0, // hide by default + "layer1.inner_margin": 0.0, + + // - Tab close hover settings + "layer0.texture": "SourcePawn/assets/tab-button-close-hover.png", + "layer0.opacity": 0.0 + }, + { + // - Tab button size + "class": "tab_close_button", + "settings": ["show_tab_close_buttons"], + "content_margin": [8, 8] + }, + { + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["dirty"]}], + "layer1.texture": "SourcePawn/assets/tab-button-close-dirty.png" + }, + { + // - Tab close hover action + "class": "tab_close_button", + "parents": [{"class": "tab_control", "attributes": ["hover"]}], + "layer1.opacity": 0.0, + "layer0.opacity": 1.0 + }, + { + // - Tab close press action + "class": "tab_close_button", + "attributes": ["hover"], + "layer1.opacity": 0.4, + "layer0.opacity": 1.0 + }, + { + // - Tab close press action + "class": "tab_close_button", + "attributes": ["pressed"], + "layer1.opacity": 1.0, + "layer0.opacity": 0.0 + }, + +// FOLD BUTTONS +// ========================================================== + + { + "class": "fold_button_control", + "layer0.texture": "SourcePawn/assets/arrow-right.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": 0, + "layer1.texture": "SourcePawn/assets/arrow-right-hover.png", + "layer1.opacity": 0.0, + "layer1.inner_margin": 0, + "content_margin": [9, 7, 8, 6] + }, + { + "class": "fold_button_control", + "attributes": ["hover"], + "layer0.opacity": 0.0, + "layer1.opacity": 0.75 + }, + { + "class": "fold_button_control", + "attributes": ["pressed"], + "layer0.opacity": 0.0, + "layer1.opacity": 1.0 + }, + { + "class": "fold_button_control", + "attributes": ["expanded"], + "layer0.texture": "SourcePawn/assets/arrow-down.png", + "layer1.texture": "SourcePawn/assets/arrow-down-hover.png" + }, + +// SCROLLBARS (overlay scrollbars from Default theme) +// ========================================================== + { + "class": "scroll_bar_control", + "layer0.texture": "SourcePawn/assets/scrollbar/well-vertical.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [1, 1], + "blur": false + }, + { + "class": "scroll_bar_control", + "attributes": ["horizontal"], + "layer0.texture": "SourcePawn/assets/scrollbar/well-horizontal.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [1, 1], + "blur": false + }, + { + "class": "scroll_corner_control", + "layer0.texture": "SourcePawn/assets/scrollbar/well-corner.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [1, 1] + }, + { + "class": "puck_control", + "layer0.texture": "SourcePawn/assets/scrollbar/bar-vertical.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [3, 3], + "content_margin": [6, 6], + "blur": false + }, + { + "class": "puck_control", + "attributes": ["horizontal"], + "layer0.texture": "SourcePawn/assets/scrollbar/bar-horizontal.png" + }, + { + "class": "scroll_area_control", + "settings": ["overlay_scroll_bars"], + "overlay": true + }, + { + "class": "scroll_area_control", + "settings": ["!overlay_scroll_bars"], + "overlay": false + }, + { + "class": "scroll_bar_control", + "settings": ["overlay_scroll_bars"], + "layer0.texture": "SourcePawn/assets/overlay/overlay_bar_vertical.png", + "layer0.inner_margin": [0, 5], + "blur": true + }, + { + "class": "scroll_bar_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["horizontal"], + "layer0.texture": "SourcePawn/assets/overlay/overlay_bar_horizontal.png", + "layer0.inner_margin": [5, 0], + "blur": true + }, + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "layer0.texture": "SourcePawn/assets/overlay/overlay_thumb_vertical.png", + "layer0.inner_margin": [0, 5], + "content_margin": [5, 20], + "blur": true + }, + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["horizontal"], + "layer0.texture": "SourcePawn/assets/overlay/overlay_thumb_horizontal.png", + "layer0.inner_margin": [5, 0], + "content_margin": [20, 5], + "blur": true + }, + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["dark"], + "layer0.texture": "SourcePawn/assets/overlay/overlay_dark_thumb_vertical.png" + }, + { + "class": "puck_control", + "settings": ["overlay_scroll_bars"], + "attributes": ["horizontal", "dark"], + "layer0.texture": "SourcePawn/assets/overlay/overlay_dark_thumb_horizontal.png" + }, + +// EMPTY WINDOW BACKGROUND +// ========================================================== + { + "class": "sheet_container_control", + "layer0.tint": [16, 16, 16], + "layer0.opacity": 1.0 + }, + +// GRID LAYOUT +// ========================================================== + { + "class": "grid_layout_control", + "border_size": 1, + "border_color": [32, 32, 32] + }, + +// MINI MAP +// ========================================================== + { + "class": "minimap_control", + "viewport_color": [185, 185, 185, 50] + }, + +// LABELS +// ========================================================== + // - General labels + { + "class": "label_control", + "color": [230, 230, 230] + }, + // - Text field labels + { + "class": "label_control", + "parents": [{"class": "panel_control"}], + "shadow_color": [0, 0, 0], + "shadow_offset": [0, 1] + }, + // - Button labels + { + "class": "label_control", + "parents": [{"class": "button_control"}], + "color": [230, 230, 230], + "shadow_color": [0, 0, 0], + "shadow_offset": [0, 1] + }, + +// TOOLTIP +// ========================================================== + // - Tooltip container + { + "class": "tool_tip_control", + "layer0.texture": "SourcePawn/assets/tooltip.png", + "layer0.inner_margin": [4, 4], + "layer0.opacity": 1, + "content_margin": [6, 4] + }, + // - Tooltip content + { + "class": "tool_tip_label_control", + "color": [160, 160, 160], + "shadow_offset": [0, 1], + "shadow_color": [0, 0, 0, 255] + }, + +// STATUS BAR +// ========================================================== + // - Status bar container + { + "class": "status_bar", + "layer0.texture": "SourcePawn/assets/status-bar-bg.png", + "layer0.opacity": 1, + "layer0.inner_margin": [2, 2], + "content_margin": [6, 5, 6, 5] + }, + { + "class": "status_button", + "min_size": [100, 0] + }, + + // - Status bar label + { + "class": "label_control", + "parents": [{"class": "status_bar"}], + "font.size": 10, + "color": [160, 160, 160], + "shadow_color": [0, 0, 0], + "shadow_offset": [0, 1] + }, + +// SIDEBAR +// ========================================================== + // - Sidebar container (border) + { + "class": "sidebar_container", + "layer0.tint": [150, 150, 150], + "layer0.opacity": 0.5, + "layer0.draw_center": false, + "layer0.inner_margin": [0, 0, 1, 0], + "content_margin": [0, 0, 1, 0] + }, + // - Sidebar tree (bg) + { + "class": "sidebar_tree", + "row_padding": [8, 3], + "indent": 15, + "indent_offset": 13, + "indent_top_level": false, + "layer0.tint": [19, 20, 21], // darker gray + "layer0.opacity": 1.0, + "dark_content": true + }, + // - Sidebar rows + { + "class": "tree_row", + "layer0.texture": "SourcePawn/assets/row-active.png", + "layer0.opacity": 0.0, + "layer0.inner_margin": [8, 3], + "layer1.opacity": 0.0, + "layer1.inner_margin": [8, 3] + }, + // - Sidebar row selected + { + "class": "tree_row", + "attributes": ["selected"], + "layer0.opacity": 1.0 + }, + // - Sidebar row dirty + { + "class": "tree_row", + "attributes": ["dirty"], + "layer0.texture": "SourcePawn/assets/row-inactive-modified.png", + "layer0.opacity": 1.0 + }, + // - Sidebar row selected dirty + { + "class": "tree_row", + "attributes": ["selected", "dirty"], + "layer0.texture": "SourcePawn/assets/row-active-modified.png", + "layer0.opacity": 1.0 + }, + // - Sidebar heading + { + "class": "sidebar_heading", + "color": [2, 196, 251], + "font.bold": true, + "shadow_color": [0, 0, 0], + "shadow_offset": [0, 1] + }, + { + "class": "sidebar_heading", + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "color": [180, 180, 180] + }, + // - Sidebar entry label + { + "class": "sidebar_label", + "color": [200, 200, 200], + "shadow_color": [0, 0, 0], + "shadow_offset": [0, 1] + }, + { + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["expandable"]}], + "settings": ["bold_folder_labels"], + "font.bold": true + }, + { // Sidebar selected entry label + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "color": [240, 240, 240], + "shadow_color": [0, 0, 0], + "shadow_offset": [0, 1] + }, + { // Sidebar Hover entry label + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "color": [2, 196, 251], + "shadow_color": [0, 0, 0], + "shadow_offset": [0, 1] + }, + { // Sidebar Hover entry label + "class": "sidebar_label", + "parents": [{"class": "tree_row", "attributes": ["dirty"]}], + "color": [253, 113, 1], + "shadow_color": [0, 0, 0], + "shadow_offset": [0, 1] + }, + + // - Sidebar open files close/dirty + { + "class": "close_button", + "layer0.texture": "SourcePawn/assets/tab-button-close-hover.png", + "layer0.opacity": 0.5, + "layer0.inner_margin": 4, + "layer1.opacity": 0.0, + "layer1.texture": "SourcePawn/assets/tab-button-close.png", + "layer1.inner_margin": 4, + "content_margin": [8, 8] + }, + { + "class": "close_button", + "attributes": ["dirty"], + "layer0.texture": "SourcePawn/assets/tab-button-dirty.png", + "layer0.opacity": 0.5 + }, + { + "class": "close_button", + "attributes": ["hover"], + "layer0.texture": "SourcePawn/assets/tab-button-close-hover.png", + "layer1.opacity": 0.5, + "layer1.texture": "SourcePawn/assets/tab-button-close.png" + }, + { + "class": "close_button", + "attributes": ["hover", "dirty"], + "layer1.opacity": 0.5, + "layer1.texture": "SourcePawn/assets/tab-button-close-dirty.png" + }, + { + "class": "close_button", + "attributes": ["pressed"], + "layer1.opacity": 1.0, + "layer1.texture": "SourcePawn/assets/tab-button-close.png" + }, + { + "class": "close_button", + "attributes": ["pressed", "dirty"], + "layer1.opacity": 1.0, + "layer1.texture": "SourcePawn/assets/tab-button-close-dirty.png" + }, + + // - Sidebar FOLDERS closed + { + "class": "disclosure_button_control", + "content_margin": [9, 7, 8, 6], + "layer0.texture": "SourcePawn/assets/folder/group-closed.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": 0 + }, + { + "class": "disclosure_button_control", + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.texture": "SourcePawn/assets/folder/group-closed-hover.png" + }, + { + "class": "disclosure_button_control", + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/folder/group-closed-selected.png" + }, + // - Sidebar Folders open + { + "class": "disclosure_button_control", + "attributes": ["expanded"], + "layer0.texture": "SourcePawn/assets/folder/group-open.png" + }, + { + "class": "disclosure_button_control", + "attributes": ["expanded"], + "parents": [{"class": "tree_row", "attributes": ["hover"]}], + "layer0.texture": "SourcePawn/assets/folder/group-open-hover.png" + }, + { + "class": "disclosure_button_control", + "attributes": ["expanded"], + "parents": [{"class": "tree_row", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/folder/group-open-selected.png" + }, + +// STANDARD TEXT BUTTONS +// ========================================================= + // - Standard buttons (used for Find / Replace panel) + { + "class": "button_control", + "content_margin": [6, 5, 6, 6], + "min_size": [75, 0], + + // Default button state + "layer0.texture": "SourcePawn/assets/btn-large.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [6, 6], + + // Pressed button setup + "layer1.texture": "SourcePawn/assets/btn-large-active.png", + "layer1.opacity": 0.0, + "layer1.inner_margin": [6, 6] + }, + { + // Pressed button state + "class": "button_control", + "attributes": ["pressed"], + "layer1.opacity": 1.0, + "content_margin": [6, 6, 6, 6] + }, + +// TEXT INPUT FIELD +// ========================================================= + + // - Text input field item + { + "class": "text_line_control", + "layer0.texture": "SourcePawn/assets/text-field.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [10, 10, 10, 10], + "content_margin": [5, 5, 5, 5] + }, + +// PANEL BACKGROUNDS +// ========================================================= + // - Bottom panel background + { + "class": "panel_control", + "layer0.texture": "SourcePawn/assets/panel-bg.png", + "layer0.inner_margin": [4, 4, 4, 4], + "layer0.opacity": 1.0 + }, + + // - Quick panel background + { + "class": "overlay_control", + "layer0.texture": "SourcePawn/assets/overlay-bg.png", + "layer0.inner_margin": [10, 5, 10, 20], // left, top, right, bottom + "layer0.opacity": 1.0, + "layer1.opacity": 0, // HIDDEN + "content_margin": [11, 8, 11, 17] + }, + +// QUICK PANEL +// ========================================================= + { + "class": "quick_panel", + "row_padding": [4, 3], + "layer0.tint": [45, 45, 45], + "layer0.opacity": 1, + "dark_content": true + }, + { + "class": "quick_panel_row", + "layer0.texture": "SourcePawn/assets/qp-row.png", + "layer0.opacity": 1.0, + "layer0.inner_margin": [4, 4, 4, 4], + "layer1.draw_center": true + }, + { + "class": "quick_panel_row", + "attributes": ["selected"], + "layer0.texture": "SourcePawn/assets/qp-row-selected.png" + }, + { + "class": "quick_panel_label", + "fg": [190, 190, 190, 255], + "match_fg": [166, 229, 255, 255], + "bg": [71, 71, 71, 255], + "selected_fg": [220, 220, 220, 255], + "selected_match_fg": [2, 196, 251, 255], + "selected_bg": [134, 134, 134, 255] + }, + { + "class": "quick_panel_path_label", + "fg": [100, 100, 100, 255], + "match_fg": [166, 229, 255, 255], + "bg": [41, 41, 41, 255], + "selected_fg": [120, 120, 120, 255], + "selected_match_fg": [2, 196, 251, 255], + "selected_bg": [24, 24, 24, 255] + }, + { + "class": "quick_panel_score_label", + "fg": [90, 90, 90, 255], + "bg": [41, 41, 41, 255], + "selected_fg": [114, 114, 114, 255], + "selected_bg": [24, 24, 24, 255] + }, + +// MINI QUICK PANEL +// ========================================================= + { + "class": "mini_quick_panel_row", + "layer0.texture": "SourcePawn/assets/qp-row.png", + "layer0.inner_margin": [4, 4, 4, 4], + "layer0.opacity": 1.0 + }, + { + "class": "mini_quick_panel_row", + "attributes": ["selected"], + "layer0.texture": "SourcePawn/assets/qp-row-selected.png" + }, + +// CODE COMPLETION DROPDOWN +// ========================================================= + { + "class": "popup_control", + "content_margin": [0, 0] + }, + { + "class": "auto_complete", + "row_padding": [2, 2], + "layer0.tint": [30, 30, 30], + "layer0.opacity": 1.0, + "dark_content": true + }, + { + "class": "auto_complete_label", + "fg": [140, 140, 140], + "match_fg": [255, 255, 255], + "bg": [26, 26, 26], + "selected_fg": [255, 255, 255], + "selected_match_fg": [255, 255, 255], + "selected_bg": [86, 86, 86] + }, + { + "class": "table_row", + "layer0.tint": [45, 45, 45], + "layer0.opacity": 0.0, + "layer0.inner_margin": [1, 1] + }, + { + "class": "table_row", + "attributes": ["selected"], + "layer0.opacity": 1.0 + }, + +// BOTTOM PANEL BUTTONS +// ========================================================== + { + "class": "icon_button_control", + "content_margin": [4, 4] + }, + { + "class": "icon_button_control", + "attributes": ["pressed"] + }, + // - Regex search button + { + "class": "icon_regex", + "layer0.texture": "SourcePawn/assets/icons/regex-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_regex", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/regex-on.png" + }, + // - Case sensitive search button + { + "class": "icon_case", + "layer0.texture": "SourcePawn/assets/icons/case-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_case", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/case-on.png" + }, + // - Match whole word search button + { + "class": "icon_whole_word", + "layer0.texture": "SourcePawn/assets/icons/whole-word-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_whole_word", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/whole-word-on.png" + }, + // - Reverse search direction button + { + "class": "icon_reverse", + "layer0.texture": "SourcePawn/assets/icons/reverse-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_reverse", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/reverse-on.png" + }, + // - Search wrap button + { + "class": "icon_wrap", + "layer0.texture": "SourcePawn/assets/icons/wrap-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_wrap", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/wrap-on.png" + }, + // - Search in selection button + { + "class": "icon_in_selection", + "layer0.texture": "SourcePawn/assets/icons/selection-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_in_selection", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/selection-on.png" + }, + // - Preserve case button + { + "class": "icon_preserve_case", + "layer0.texture": "SourcePawn/assets/icons/preserve-case-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_preserve_case", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/preserve-case-on.png" + }, + // - Highlight results button + { + "class": "icon_highlight", + "layer0.texture": "SourcePawn/assets/icons/highlight-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_highlight", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/highlight-on.png" + }, + + // BOTTOM PANEL ICONS (EXTENDED: FIND IN FILES) + // ========================================================= + + // - Show search context button + { + "class": "icon_context", + "layer0.texture": "SourcePawn/assets/icons/context-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_context", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/context-on.png" + }, + // - Use search buffer + { + "class": "icon_use_buffer", + "layer0.texture": "SourcePawn/assets/icons/buffer-off.png", + "layer0.opacity": 1.0, + "content_margin": [9, 10] + }, + { + "class": "icon_use_buffer", + "parents": [{"class": "icon_button_control", "attributes": ["selected"]}], + "layer0.texture": "SourcePawn/assets/icons/buffer-on.png" + } + +] diff --git a/samples/Sublime Text Config/jade.sublime-completions b/samples/Sublime Text Config/jade.sublime-completions new file mode 100644 index 00000000..cd3894b7 --- /dev/null +++ b/samples/Sublime Text Config/jade.sublime-completions @@ -0,0 +1,136 @@ +{ + "scope": "entity.name.tag.jade", + "completions": + [ + "a",// Defines a hyperlink + "abbr",// Defines an abbreviation + "acronym",// Not supported in HTML5. Use instead. + //Defines an acronym + "address",// Defines contact information for the author/owner of a document + "applet",// Not supported in HTML5. Use instead. + //Defines an embedded applet + "area",// Defines an area inside an image-map + "article",// Defines an article + "aside",// Defines content aside from the page content + "audio",// Defines sound content + "b",// Defines bold text + "base",// Specifies the base URL/target for all relative URLs in a document + "basefont",// Not supported in HTML5. Use CSS instead. + //Specifies a default color, size, and font for all text in a document + "bdi",// Isolates a part of text that might be formatted in a different direction from other text outside it + "bdo",// Overrides the current text direction + "big",// Not supported in HTML5. Use CSS instead. + //Defines big text + "blockquote",// Defines a section that is quoted from another source + "body",// Defines the document's body + "br",// Defines a single line break + "button",// Defines a clickable button + "canvas",// Used to draw graphics, on the fly, via scripting (usually JavaScript) + "caption",// Defines a table caption + "center",// Not supported in HTML5. Use CSS instead. + //Defines centered text + "cite",// Defines the title of a work + "code",// Defines a piece of computer code + "col",// Specifies column properties for each column within a element + "colgroup",// Specifies a group of one or more columns in a table for formatting + "command",// Defines a command button that a user can invoke + "datalist",// Specifies a list of pre-defined options for input controls + "dd",// Defines a description/value of a term in a description list + "del",// Defines text that has been deleted from a document + "details",// Defines additional details that the user can view or hide + "dfn",// Defines a definition term + "dialog",// Defines a dialog box or window + "dir",// Not supported in HTML5. Use
    instead. + //Defines a directory list + "div",// Defines a section in a document + "dl",// Defines a description list + "dt",// Defines a term/name in a description list + "em",// Defines emphasized text + "embed",// Defines a container for an external (non-HTML) application + "fieldset",// Groups related elements in a form + "figcaption",// Defines a caption for a
    element + "figure",// Specifies self-contained content + "font",// Not supported in HTML5. Use CSS instead. + //Defines font, color, and size for text + "footer",// Defines a footer for a document or section + "form",// Defines an HTML form for user input + "frame",// Not supported in HTML5. + //Defines a window (a frame) in a frameset + "frameset",// Not supported in HTML5. + //Defines a set of frames + "h1",// to
    Defines HTML headings + "head",// Defines information about the document + "header",// Defines a header for a document or section + "hgroup",// Groups heading elements + "hr",// Defines a thematic change in the content + "html",// Defines the root of an HTML document + "i",// Defines a part of text in an alternate voice or mood + "iframe",// Defines an inline frame + "img",// Defines an image + "input",// Defines an input control + "ins",// Defines a text that has been inserted into a document + "kbd",// Defines keyboard input + "keygen",// Defines a key-pair generator field (for forms) + "label",// Defines a label for an element + "legend",// Defines a caption for a
    element + "li",// Defines a list item + "link",// Defines the relationship between a document and an external resource (most used to link to style sheets) + "main",// Specifies the main content of a document + "map",// Defines a client-side image-map + "mark",// Defines marked/highlighted text + "menu",// Defines a list/menu of commands + "meta",// Defines metadata about an HTML document + "meter",// Defines a scalar measurement within a known range (a gauge) + "nav",// Defines navigation links + "noframes",// Not supported in HTML5. + //Defines an alternate content for users that do not support frames + "noscript",// Defines an alternate content for users that do not support client-side scripts + "object",// Defines an embedded object + "ol",// Defines an ordered list + "optgroup",// Defines a group of related options in a drop-down list + "option",// Defines an option in a drop-down list + "output",// Defines the result of a calculation + "p",// Defines a paragraph + "param",// Defines a parameter for an object + "pre",// Defines preformatted text + "progress",// Represents the progress of a task + "q",// Defines a short quotation + "rp",// Defines what to show in browsers that do not support ruby annotations + "rt",// Defines an explanation/pronunciation of characters (for East Asian typography) + "ruby",// Defines a ruby annotation (for East Asian typography) + "s",// Defines text that is no longer correct + "samp",// Defines sample output from a computer program + "script",// Defines a client-side script + "section",// Defines a section in a document + "select",// Defines a drop-down list + "small",// Defines smaller text + "source",// Defines multiple media resources for media elements (