vprimachenko / Sublime-Colorcoder

Semantic highlight for Sublime Text
290 stars 25 forks source link

How to get extension working? #1

Closed jdlyga closed 10 years ago

jdlyga commented 10 years ago

I love the idea of this extension, but I can't get it to work in Sublime Text 2. I'm testing this out viewing .cpp and .h files using the colorcoder color scheme, and it looks like normal Obsidian to me. I installed the extension using package control. Does it automatically start working or are there additional setup procedures? Is there a comand that I need to run? Do I need to copy over the modified c++ language files somewhere else? Thanks!

vprimachenko commented 10 years ago

indeed, it does seem not to work in sublime 2, i am looking into this

vprimachenko commented 10 years ago

quick and dirty hack is to edit the plugin (i will make changes to the plugin in the repo soon)

@@ -47,2 +47,2 @@
-   def on_activated_async(self, view):
-       self.on_modified_async(view)
+   def on_activated(self, view):
+       self.on_modified(view)
@@ -50,1 +50,1 @@
-   def on_modified_async(self, view):
+   def on_modified(self, view):
@@ -59,1 +59,1 @@
-           view.add_regions('cc'+key,regs[key],'cc'+key,'', sublime.DRAW_NO_OUTLINE )
+           view.add_regions('cc'+key,regs[key],'cc'+key )

you also need to select C++ (Colorcode) as language

vprimachenko commented 10 years ago

@jdlyga please confirm the issue is fixed in newest version

jdlyga commented 10 years ago

@vprimachenko the latest version looks good to me in Sublime Text 2.02. I didn't have to manually select the colorcoder c++ syntax highlighting since it simultaneously selects c++ and c++ colorcoder. Thanks for the quick fix

vprimachenko commented 10 years ago

you're welcome, tune in for updates and feel free to submit feature requests