Merge pull request #2029 from devoncarew/devoncarew_gitignore
Devoncarew gitignore
This commit is contained in:
commit
d3ddd74fe7
6 changed files with 69 additions and 0 deletions
11
demo/kitchen-sink/docs/.gitignore
vendored
Normal file
11
demo/kitchen-sink/docs/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# A sample .gitignore file.
|
||||
|
||||
.buildlog
|
||||
.DS_Store
|
||||
.svn
|
||||
|
||||
# Negated patterns:
|
||||
!foo.bar
|
||||
|
||||
# Also ignore user settings...
|
||||
/.settings
|
||||
|
|
@ -70,6 +70,7 @@ var supportedModes = {
|
|||
Forth: ["frt|fs|ldr"],
|
||||
FTL: ["ftl"],
|
||||
Gherkin: ["feature"],
|
||||
Gitignore: ["^.gitignore"],
|
||||
Glsl: ["glsl|frag|vert"],
|
||||
golang: ["go"],
|
||||
Groovy: ["groovy"],
|
||||
|
|
|
|||
19
lib/ace/mode/gitignore.js
Normal file
19
lib/ace/mode/gitignore.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var GitignoreHighlightRules = require("./gitignore_highlight_rules").GitignoreHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = GitignoreHighlightRules;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/gitignore";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
31
lib/ace/mode/gitignore_highlight_rules.js
Normal file
31
lib/ace/mode/gitignore_highlight_rules.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var GitignoreHighlightRules = function() {
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
{
|
||||
token : "comment",
|
||||
regex : /^\s*#.*$/
|
||||
}, {
|
||||
token : "keyword", // negated patterns
|
||||
regex : /^\s*!.*$/
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
GitignoreHighlightRules.metaData = {
|
||||
fileTypes: ['gitignore'],
|
||||
name: 'Gitignore'
|
||||
};
|
||||
|
||||
oop.inherits(GitignoreHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.GitignoreHighlightRules = GitignoreHighlightRules;
|
||||
});
|
||||
7
lib/ace/snippets/gitignore.js
Normal file
7
lib/ace/snippets/gitignore.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.snippetText = require("../requirejs/text!./gitignore.snippets");
|
||||
exports.scope = "gitignore";
|
||||
|
||||
});
|
||||
0
lib/ace/snippets/gitignore.snippets
Normal file
0
lib/ace/snippets/gitignore.snippets
Normal file
Loading…
Add table
Add a link
Reference in a new issue