summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2010-12-30 14:24:18 -0500
committerKris Maglione <maglione.k@gmail.com>2010-12-30 14:24:18 -0500
commitc671cc84e03fa6efe910e40426260e7be1dfcbcb (patch)
tree4705bb8e0a183fb6fcf62ac7f456269e449dcf74
parent506dcc042eda00e96e5db35efdd81e8699d26335 (diff)
downloadpentadactyl-c671cc84e03fa6efe910e40426260e7be1dfcbcb.tar.gz
Allow using heredocs with :abbr/:au/:com/:map.
-rw-r--r--common/content/abbreviations.js13
-rw-r--r--common/content/autocommands.js1
-rw-r--r--common/content/commands.js1
-rw-r--r--common/content/mappings.js1
4 files changed, 10 insertions, 6 deletions
diff --git a/common/content/abbreviations.js b/common/content/abbreviations.js
index 1b3f76a3..cde225c1 100644
--- a/common/content/abbreviations.js
+++ b/common/content/abbreviations.js
@@ -247,19 +247,20 @@ var Abbreviations = Module("abbreviations", {
abbreviations.add(modes, lhs, rhs);
}
}, {
- options: [
- {
- names: ["-javascript", "-js", "-j"],
- description: "Expand this abbreviation by evaluating its right-hand-side as JavaScript"
- }
- ],
completer: function (context, args) {
if (args.length == 1)
return completion.abbreviation(context, modes);
else if (args["-javascript"])
return completion.javascript(context);
},
+ hereDoc: true,
literal: 1,
+ options: [
+ {
+ names: ["-javascript", "-js", "-j"],
+ description: "Expand this abbreviation by evaluating its right-hand-side as JavaScript"
+ }
+ ],
serialize: function () [
{
command: this.name,
diff --git a/common/content/autocommands.js b/common/content/autocommands.js
index 802b1ecd..98fe7ac6 100644
--- a/common/content/autocommands.js
+++ b/common/content/autocommands.js
@@ -178,6 +178,7 @@ var AutoCommands = Module("autocommands", {
if (args.length == 3)
return args["-javascript"] ? completion.javascript(context) : completion.ex(context);
},
+ hereDoc: true,
literal: 2,
options: [
{
diff --git a/common/content/commands.js b/common/content/commands.js
index 5b0d2218..26be1d79 100644
--- a/common/content/commands.js
+++ b/common/content/commands.js
@@ -1365,6 +1365,7 @@ var Commands = Module("commands", {
else
args["-javascript"] ? completion.javascript(context) : completion.ex(context);
},
+ hereDoc: true,
options: [
{ names: ["-bang", "-b"], description: "Command may be followed by a !" },
{ names: ["-count", "-c"], description: "Command may be preceded by a count" },
diff --git a/common/content/mappings.js b/common/content/mappings.js
index 7480f739..a77f03ed 100644
--- a/common/content/mappings.js
+++ b/common/content/mappings.js
@@ -389,6 +389,7 @@ var Mappings = Module("mappings", {
return completion.ex(context);
}
},
+ hereDoc: true,
literal: 1,
options: [
{