[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kate] part/script/data/commands: select language by HL
From: Christoph Cullmann <cullmann () kde ! org>
Date: 2012-10-31 20:11:09
Message-ID: 20121031201109.5B3E6A6078 () git ! kde ! org
[Download RAW message or body]
Git commit 840f3bf241afab427563ecec69643ee8f1aa8e8e by Christoph Cullmann.
Committed on 31/10/2012 at 21:11.
Pushed by cullmann into branch 'master'.
select language by HL
M +11 -2 part/script/data/commands/quickcoding.js
http://commits.kde.org/kate/840f3bf241afab427563ecec69643ee8f1aa8e8e
diff --git a/part/script/data/commands/quickcoding.js b/part/script/data/commands/quickcoding.js
index 0f28490..8f2b52b 100644
--- a/part/script/data/commands/quickcoding.js
+++ b/part/script/data/commands/quickcoding.js
@@ -40,7 +40,7 @@ function quickCodingExpand ()
{
/**
* some settings
- * should be read from document/view...
+ * FIXME: should be read from document/view...
*/
var indentChars = " ";
@@ -91,10 +91,19 @@ function quickCodingExpand ()
}
/**
+ * choose right language for abbreviations
+ * FIXME: remember that more generic, not this if then else trash here
+ */
+ var language = "none";
+ if (document.highlightingMode().match(/C\+\+/)) {
+ language = "cpp";
+ }
+
+ /**
* get abbreviation template
* else nothing to do
*/
- var template = read("quickcoding/cpp/" + abbreviationParts[0] + ".template");
+ var template = read("quickcoding/" + language + "/" + abbreviationParts[0] + ".template");
if (!template)
return;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic