码迷,mamicode.com
首页 > 其他好文 > 详细

sublime使用总结

时间:2016-04-12 19:08:36      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:

1. graphviz:
我把graphviz文件扩展名定为.gv,sublime不能识别。我就下载了插件:syntaxManager,参考https://packagecontrol.io/packages/Syntax%20Manager。

然后在Preference->syntaxManager中:

{
    "syntaxmgr_settings": [
        {
            // platforms, can be osx, windows or linux
            "platforms": ["linux", "windows"],
            "settings": {
                "font_size" : 14
            }
        },
        {
            // apply this setting when first line matches
            // be careful that it is not a list but a string
            "first_line_match": "#!/.*?/sh",
            "settings": {
                // the syntax can be identified by running
                //
                //     view.settings().get("syntax")
                //
                // at sublime console (ctrl + ` )
                //
                "syntax" : "Packages/ShellScript/Shell-Unix-Generic.tmLanguage"
            }
        },
        {
            // the scope of the document can be obtained by pressing
            // cmd+alt+p (mac) or ctrl+alt+shift+p (linux / windows)

            // for c and python files
            "scopes": ["source.c", "source.python"],
            "settings": {
                "trim_trailing_white_space_on_save_scope" : true,
                "auto_match_enabled" : true
            }
        },
        {
            // all text files
            "scopes": ["text"],
            "settings": {
                "spell_check": true,
                "color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme"
            }
        },
        {
            // use latex syntex for these extensions
            // make sure the syntax is applied first and then the settings
            "extensions": ["ltx", "latex", "l"],
            "settings": {
                "syntax": "Packages/LaTeX/LaTeX.tmLanguage"
            }
        },
        {
            // for all text files, excluding latex files
            "scopes": ["text"],
            "scopes_excluded": ["text.tex"],
            "settings": {
                "spell_check": false
            }
        }
    ]
}

其中增加一段 :

//"first_line_match": ["digraph", "graph"],
"extensions": ["gv", "dot"],
"settings": {
// the syntax can be identified by running
//
// view.settings().get("syntax")
//
// at sublime console (ctrl + ` )
//
"syntax" : "Packages/Graphviz/DOT.tmLanguage"
}

"first_line_match": ["digraph*", "graph*"]”不起作用。
因为first_line_match的语法不清楚,所以只能用extensions。

sublime使用总结

标签:

原文地址:http://www.cnblogs.com/tangxiaosheng/p/5383562.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!