Converting Emacs/vim highlighting to TextMate (for SublimeText)

北城以北 提交于 2019-12-21 21:44:12

问题


I have syntax highlighting files for Pyret in vim (.vim) and emacs (.el) and would like to use them in Sublime Text (3).

According to this answer and other research, Sublime Text style themes are written in TextMate format.

There exists a tool to help convert from TextMate to Emacs, but I contacted the author and he isn't aware of any tools to help facilitate the opposite conversion.

A similar question was asked (re: vim) but not answered a year ago: .vim syntax highlighting to textmate or sublime text 2 -- that asker ended up building his own TextMate theme manually, but I'm not sure how to go about that.

I would like to know if there have been developed any tools to help convert a vim or emacs syntax style file to TextMate, and, if not, how I would go about converting the vim/el files into JSON/XML for importing into TextMate.


回答1:


While I haven't been able to find any tools to help me out, I have found some help.

This explanation of how to build a vim style guide has proven invaluable in helping me understand the construction of the vim syntax file I am converting.

This a super-helpful guide is walking me through how to manually build a template in YAML and then convert it to SublimeText's tmLanguage via the PackageDev SublimeText package.

EDIT: My solution, with instructions, is available here.



来源:https://stackoverflow.com/questions/28592093/converting-emacs-vim-highlighting-to-textmate-for-sublimetext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!