Syntax highlighting (.tmLanguage) in Sublime Text 3 for packages

I am working on this plugin

Syntax highlighting does not work with Sublime Text 3 when the plugin is installed using package management.

Error loading syntax file "Sublime Text 3/Installed Packages/robot.tmLanguage": Unable to open Sublime Text 3/Installed Packages/robot.tmLanguage

The plugin is located under the Installed Packcages/Robot Framework Assistant.sublime-packagefile "robot.tmLanguage" inside the archive Robot Framework Assistant.sublime-package.

This is how I set the paths https://github.com/andriyko/sublime-robot-framework-assistant/blob/master/rfassistant/ init .py

My question is similar to this thread , but in my case the plugin is installed as an archive (.sublime-package), and not a folder with files.

  • I'm not sure if the path settings mentioned above are correct in python3.

  • How can I reference the tmLanguage file that is inside the .sublime-package file?

  • ? , Sublime Text 2 Sublime Text 3 ( dir github), Control Package.

, tmLanguage . , , zip github ( RobotFrameworkAssistant Packages). , Control Package.

+4
3

, , . , fix.

(.tmLanguage) ST3?

ST3, . ( , Packages, Installed Packages).

Sublime Text 3 "" : Installed Packages Packages.

Package Control, Installed Packages, Robot Framework Assistant.sublime-package ( ZIP). robot.tmLanguage ( ) Robot Framework Assistant.sublime-package.

, , : ( view.set_syntax_file)?

, Packages/Robot Framework Assistant/robot.tmLanguage. , Packages Users. , , , (Robot Framework Assistant ).

+2

tmLanguage? , . sublime.load_resource(name), Packages/Robot Framework Assistant/robot.tmLanguage. , view.set_syntax_file(syntax_file), syntax_file - . , , , , , .

, , , , ST2. , .

ST3, jps .sublime-package , . .zip. , , API .

, ST3 ST2.

http://www.sublimetext.com/docs/3/porting_guide.html

+3

.tmLanguage :

  • myLang.tmLanguage .
  • , myLang.zip
  • zip- myLang.sublime-package
  • myLang.sublime-package Sublime 3. .

Based on the ST3 docs, I cannot find an alternative to this manual method right now, but it will work.

Package management is likely to do everything you need behind the scenes

+3
source

All Articles