diff --git a/Default (Linux).sublime-keymap b/Default (Linux).sublime-keymap
index 56e5d0c..253b7e0 100644
--- a/Default (Linux).sublime-keymap
+++ b/Default (Linux).sublime-keymap
@@ -1,11 +1,11 @@
[
{ "keys": ["ctrl+i"], "command": "renpy_text_tag", "args": {"tag": "i"}, "context": [
- { "key": "selector", "operator": "equal", "operand": "source.python.renpy" }
+ { "key": "selector", "operator": "equal", "operand": "string.quoted" }
] },
{ "keys": ["ctrl+b"], "command": "renpy_text_tag", "args": {"tag": "b"}, "context": [
- { "key": "selector", "operator": "equal", "operand": "source.python.renpy" }
+ { "key": "selector", "operator": "equal", "operand": "string.quoted" }
] },
{ "keys": ["ctrl+u"], "command": "renpy_text_tag", "args": {"tag": "u"}, "context": [
- { "key": "selector", "operator": "equal", "operand": "source.python.renpy" }
+ { "key": "selector", "operator": "equal", "operand": "string.quoted" }
] }
]
\ No newline at end of file
diff --git a/Default (OSX).sublime-keymap b/Default (OSX).sublime-keymap
index 88ff169..f7e7103 100644
--- a/Default (OSX).sublime-keymap
+++ b/Default (OSX).sublime-keymap
@@ -1,11 +1,11 @@
[
{ "keys": ["super+i"], "command": "renpy_text_tag", "args": {"tag": "i"}, "context": [
- { "key": "selector", "operator": "equal", "operand": "source.python.renpy" }
+ { "key": "selector", "operator": "equal", "operand": "string.quoted" }
] },
{ "keys": ["super+b"], "command": "renpy_text_tag", "args": {"tag": "b"}, "context": [
- { "key": "selector", "operator": "equal", "operand": "source.python.renpy" }
+ { "key": "selector", "operator": "equal", "operand": "string.quoted" }
] },
{ "keys": ["super+u"], "command": "renpy_text_tag", "args": {"tag": "u"}, "context": [
- { "key": "selector", "operator": "equal", "operand": "source.python.renpy" }
+ { "key": "selector", "operator": "equal", "operand": "string.quoted" }
] }
]
\ No newline at end of file
diff --git a/Default (Windows).sublime-keymap b/Default (Windows).sublime-keymap
index 56e5d0c..253b7e0 100644
--- a/Default (Windows).sublime-keymap
+++ b/Default (Windows).sublime-keymap
@@ -1,11 +1,11 @@
[
{ "keys": ["ctrl+i"], "command": "renpy_text_tag", "args": {"tag": "i"}, "context": [
- { "key": "selector", "operator": "equal", "operand": "source.python.renpy" }
+ { "key": "selector", "operator": "equal", "operand": "string.quoted" }
] },
{ "keys": ["ctrl+b"], "command": "renpy_text_tag", "args": {"tag": "b"}, "context": [
- { "key": "selector", "operator": "equal", "operand": "source.python.renpy" }
+ { "key": "selector", "operator": "equal", "operand": "string.quoted" }
] },
{ "keys": ["ctrl+u"], "command": "renpy_text_tag", "args": {"tag": "u"}, "context": [
- { "key": "selector", "operator": "equal", "operand": "source.python.renpy" }
+ { "key": "selector", "operator": "equal", "operand": "string.quoted" }
] }
]
\ No newline at end of file
diff --git a/Python.tmPreferences b/Python.tmPreferences
new file mode 100644
index 0000000..aac9057
--- /dev/null
+++ b/Python.tmPreferences
@@ -0,0 +1,34 @@
+
+
+
+
+ name
+ Python Indent Rules
+ scope
+ source.python.renpy
+ settings
+
+ decreaseIndentPattern
+ ^\s*(elif|else|except|finally)\b.*:
+ increaseIndentPattern
+ .+?(?=:\s*$)
+ disableIndentNextLinePattern
+
+ shellVariables
+
+
+ name
+ TM_COMMENT_START
+ value
+ #
+
+
+ name
+ TM_LINE_TERMINATOR
+ value
+ :
+
+
+
+
+
\ No newline at end of file
diff --git a/RenpyGameplay.sublime-completions b/RenpyGameplay.sublime-completions
index 139f66e..2632da9 100644
--- a/RenpyGameplay.sublime-completions
+++ b/RenpyGameplay.sublime-completions
@@ -9,5 +9,6 @@
{ "trigger": "scene", "contents": "scene $0" },
{ "trigger": "show", "contents": "show $0" },
{ "trigger": "menu", "contents": "menu:\n\t\"$0\"\n\n\t\"Choice 1\":\n\n\t\tpass\n\n\t\"Choice 2\":\n\n\t\tpass" },
+ { "trigger": "renpy.input", "contents": "\\$ renpy.input(prompt='$0', default='', allow=None, exclude='{}', length=None, with_none=None, pixel_width=None)" },
]
}
\ No newline at end of file
diff --git a/RenpyLanguage.JSON-tmLanguage b/RenpyLanguage.JSON-tmLanguage
index e5631d2..3bd182c 100644
--- a/RenpyLanguage.JSON-tmLanguage
+++ b/RenpyLanguage.JSON-tmLanguage
@@ -22,7 +22,7 @@
{"include": "#ingame"},
{
- "begin": "^(\\s)*python:",
+ "begin": "^(\\s)*python(\\s)*:(\\s)*$",
"beginCaptures":{
"0":{"name":"keyword.control.flow.renpy"}
},
@@ -35,7 +35,7 @@
},
{
- "match":"^(\\s*)(\\$)$\n?",
+ "match":"^(\\s*)(\\$)(.*)$\n?",
"patterns": [
{"include": "#python"},
{"include": "source.python"}
@@ -124,7 +124,7 @@
},
{
- "begin": "^(\\s)*python:",
+ "begin": "^(\\s)*python(\\s)*:(\\s)*$",
"beginCaptures":{
"0":{"name":"keyword.control.flow.renpy"}
},
@@ -136,15 +136,6 @@
"name": "source.python.renpy"
},
- {
- "match":"^(\\s*)(\\$)$\n?",
- "patterns": [
- {"include": "#python"},
- {"include": "source.python"}
- ],
- "name": "source.python.renpy"
- },
-
{
"begin": "^(\\s)*init(\\s)+((\\+|\\-)\\d+\\s+)?python:",
"beginCaptures":{
@@ -259,14 +250,12 @@
"python": {
"patterns": [
{
- "begin": "(\\s)*(renpy\\.)(.*)",
+ "begin": "(\\s)*(renpy\\.)([a-zA-Z0-9_]*)",
"beginCaptures":{
+ "0":{"name":"source.python"},
"2":{"name":"keyword.control.flow.renpy"},
"3":{"name":"variable.renpy"}
},
- "patterns": [
- {"include": "source.python"}
- ],
"end": "\n"
}
]
diff --git a/RenpyLanguage.tmLanguage b/RenpyLanguage.tmLanguage
index 9450335..16c50ad 100644
--- a/RenpyLanguage.tmLanguage
+++ b/RenpyLanguage.tmLanguage
@@ -80,7 +80,7 @@
match
- ^(\s*)(\$)$
+ ^(\s*)(\$)(.*)$
?
name
source.python.renpy
@@ -269,7 +269,7 @@
begin
- ^(\s)*python:
+ ^(\s)*python(\s)*:(\s)*$
beginCaptures
0
@@ -294,24 +294,6 @@
-
- match
- ^(\s*)(\$)$
-?
- name
- source.python.renpy
- patterns
-
-
- include
- #python
-
-
- include
- source.python
-
-
-
begin
^(\s)*init(\s)+((\+|\-)\d+\s+)?python:
@@ -450,9 +432,14 @@
begin
- (\s)*(renpy\.)(.*)
+ (\s)*(renpy\.)([a-zA-Z0-9_]*)
beginCaptures
+ 0
+
+ name
+ source.python
+
2
name
@@ -467,13 +454,6 @@
end
- patterns
-
-
- include
- source.python
-
-
diff --git a/TODO.txt b/TODO.txt
index 881857c..00d3229 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,11 +1,4 @@
-Indent doesn't work properly for "python:", as it's in the
-source.python context, rather than the source.renpy context.
-
- ground inside imagemaps isn't orange like xpos and stuff
-- the "# The two window variant." comment in say screen has window variant in pink
-- Comments are the same color as all text apart from keywords, I think it's nice if comments have different colors though(Maybe just because I'm used to it since the other editors I use have it like this and it was like this before?)
-- Strings are white just as everything else(they were dark yellow before I think?)
-- I believe numbers had a different color before?
-- If/else/for are white
- input(eg in input screen) is white
-- init/style aren't working properly(see image)
\ No newline at end of file
+- init/style aren't working properly(see image)
+- parameters aren't highlighted within python blocks
\ No newline at end of file
diff --git a/messages.json b/messages.json
index 8919585..bddd5b6 100644
--- a/messages.json
+++ b/messages.json
@@ -11,5 +11,6 @@
"1.1.01": "messages/1.1.1.txt",
"1.1.02": "messages/1.1.2.txt",
"1.1.03": "messages/1.1.3.txt",
- "1.1.04": "messages/1.1.4.txt"
+ "1.1.04": "messages/1.1.4.txt",
+ "1.1.05": "messages/1.1.5.txt"
}
diff --git a/messages/1.1.5.txt b/messages/1.1.5.txt
new file mode 100644
index 0000000..0e428fd
--- /dev/null
+++ b/messages/1.1.5.txt
@@ -0,0 +1,11 @@
+Sublime Renpy v1.1.5
+======================
+
+Bugfixes:
+-ctrl+i, b and u hotkey are now overridden again
+-single-line Python statements now work as anticipated
+-python and init python blocks now indent properly
+
+Improvements:
+-the ctrl hotkey overrides now only occur within strings
+-added autocomplete for renpy.input within label context
\ No newline at end of file