Permalink
Browse files

notebook-specific color theme to more clearly separate input/output a…

…reas
  • Loading branch information...
1 parent b279482 commit cbaf648d9eb0f32fe53167a080191a07e9b7051e @maximsch2 committed Jul 2, 2013
@@ -0,0 +1,4 @@
+{
+ "color_scheme": "Packages/SublimeIPythonNotebook/ipynb2.hidden-tmTheme",
+
+}
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
@@ -12,7 +12,8 @@
<array>
<dict>
<key>begin</key>
- <string>\#Input-R\[.*\]</string>
+ <string>\#Input-R\[.*\]
+</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
@@ -21,6 +22,8 @@
<string>comment</string>
</dict>
</dict>
+ <key>contentName</key>
+ <string>ipynb.source.input.r</string>
<key>end</key>
<string>\#\/Input</string>
<key>endCaptures</key>
@@ -31,8 +34,6 @@
<string>comment</string>
</dict>
</dict>
- <key>name</key>
- <string>ipynb.source.input.r</string>
<key>patterns</key>
<array>
<dict>
@@ -43,7 +44,8 @@
</dict>
<dict>
<key>begin</key>
- <string>\#Input\[.*\]</string>
+ <string>\#Input\[.*\]
+</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
@@ -52,6 +54,8 @@
<string>comment</string>
</dict>
</dict>
+ <key>contentName</key>
+ <string>ipynb.source.input.python</string>
<key>end</key>
<string>\#\/Input</string>
<key>endCaptures</key>
@@ -62,8 +66,6 @@
<string>comment</string>
</dict>
</dict>
- <key>name</key>
- <string>ipynb.source.input.python</string>
<key>patterns</key>
<array>
<dict>
@@ -74,7 +76,8 @@
</dict>
<dict>
<key>begin</key>
- <string>\#Output\[.*\]</string>
+ <string>\#Output\[.*\]
+</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
@@ -83,6 +86,8 @@
<string>comment</string>
</dict>
</dict>
+ <key>contentName</key>
+ <string>ipynb.source.output</string>
<key>end</key>
<string>\#\/Output</string>
<key>endCaptures</key>
@@ -93,8 +98,6 @@
<string>comment</string>
</dict>
</dict>
- <key>name</key>
- <string>ipynb.source.output</string>
</dict>
<dict>
<key>match</key>
@@ -11,8 +11,8 @@
{
- "name": "ipynb.source.input.r",
- "begin": "\\#Input-R\\[.*\\]",
+ "contentName": "ipynb.source.input.r",
+ "begin": "\\#Input-R\\[.*\\]\n",
"end": "\\#\\/Input",
"beginCaptures": {
"0": { "name": "comment"}
@@ -28,8 +28,8 @@
},
{
- "name": "ipynb.source.input.python",
- "begin": "\\#Input\\[.*\\]",
+ "contentName": "ipynb.source.input.python",
+ "begin": "\\#Input\\[.*\\]\n",
"patterns": [
{
"include": "source.python"
@@ -46,8 +46,9 @@
},
{
- "name": "ipynb.source.output",
- "begin": "\\#Output\\[.*\\]",
+ "contentName": "ipynb.source.output",
+ //"name": "storage.type.string.python",
+ "begin": "\\#Output\\[.*\\]\n",
"end": "\\#\\/Output",
"beginCaptures": {
"0": { "name": "comment"}
View
@@ -312,7 +312,7 @@ def set_name(self, new_name):
view.set_name("IPy Notebook - " + self.notebook.name)
def get_cell_separator(self):
- return "="*120
+ return "\n\n"
def on_sel_modified(self):
readonly = True
@@ -368,7 +368,7 @@ def on_modified(self):
def highlight_cell(self, input_region):
reg = self.view.line(input_region.begin()-2)
reg2 = self.view.line(input_region.end()+2)
- self.view.add_regions("inb_highlight", [reg, reg2], "comment", "", sublime.DRAW_EMPTY)
+ self.view.add_regions("inb_highlight", [reg, reg2], "ipynb.source.highlight", "", sublime.DRAW_EMPTY)
def on_backspace(self):
s = self.view.sel()[0]
Oops, something went wrong. Retry.

0 comments on commit cbaf648

Please sign in to comment.