From 0a51732d0e9fbbc42376fbe1337e546024817a3c Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 21 Sep 2012 04:52:49 +1000 Subject: [PATCH] Add missing header to the :mkv generated ftdetect file. --- common/modules/io.jsm | 55 +++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/common/modules/io.jsm b/common/modules/io.jsm index f4f6bee1..ab3339e0 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -675,12 +675,15 @@ var IO = Module("io", { item.file = file; } - rtItems.ftdetect.template = rc*,*. set filetype=]]>; + rtItems.ftdetect.template = // {{{ + + +au BufNewFile,BufRead *rc*,*. set filetype= +]]>;//}}} rtItems.ftplugin.template = // {{{ configuration file -" Maintainer: -" Version: +
if exists("b:did_ftplugin") finish @@ -707,9 +710,7 @@ unlet s:cpo_save ]]>;//}}} rtItems.syntax.template = // {{{ configuration file -" Maintainer: -" Version: +
if exists("b:current_syntax") finish @@ -786,29 +787,11 @@ let b:current_syntax = "" let &cpo = s:cpo_save unlet s:cpo_save -" vim: tw=130 et ts=4 sw=4: +" vim: tw=130 et ts=8 sts=4 sw=4: ]]>;//}}} const { options } = modules; - let params = {//{{{ - version: config.version, - name: config.name, - appname: config.appName, - fileext: config.fileExtension, - maintainer: "Doug Kearns ", - autocommands: wrap("syn keyword " + config.name + "AutoEvent ", - keys(config.autocommands)), - commands: wrap("syn keyword " + config.name + "Command ", - array(c.specs for (c in commands.iterator())).flatten()), - options: wrap("syn keyword " + config.name + "Option ", - array(o.names for (o in options) if (o.type != "boolean")).flatten()), - toggleoptions: wrap("let s:toggleOptions = [", - array(o.realNames for (o in options) if (o.type == "boolean")) - .flatten().map(String.quote), - ", ") + "]" - };//}}} - const WIDTH = 80; function wrap(prefix, items, sep) {//{{{ sep = sep || " "; @@ -829,6 +812,26 @@ unlet s:cpo_save return lines.map(function (l) l.join("")).join("\n").replace(/\s+\n/gm, "\n"); }//}}} + let params = { // {{{ + header: ['" Language: ' + config.appName + ' configuration file', + '" Maintainer: Doug Kearns ', + '" Version: ' + config.version].join("\n"), + name: config.name, + appname: config.appName, + fileext: config.fileExtension, + maintainer: "Doug Kearns ", + autocommands: wrap("syn keyword " + config.name + "AutoEvent ", + keys(config.autocommands)), + commands: wrap("syn keyword " + config.name + "Command ", + array(c.specs for (c in commands.iterator())).flatten()), + options: wrap("syn keyword " + config.name + "Option ", + array(o.names for (o in options) if (o.type != "boolean")).flatten()), + toggleoptions: wrap("let s:toggleOptions = [", + array(o.realNames for (o in options) if (o.type == "boolean")) + .flatten().map(String.quote), + ", ") + "]" + }; // }}} + for (let { file, template } in values(rtItems)) { try { file.write(util.compileMacro(template, true)(params));