码迷,mamicode.com
首页 > 编程语言 > 详细

sublime搭建c++/java/lua/python/ruby的配置文件

时间:2015-12-14 14:27:04      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:

本人电脑win7 64位

提前装一下convert to utf-8插件,编译运行出现乱码,组合键ctrl+shift+c把源文件转成gbk编码. 仍乱码的话,重启编辑器|电脑|重新编辑中文部分。

c++

{
    "cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.c, source.c++",
     "encoding": "cp936",
"variants":
[
{
    "name":"Run",
    "cmd": ["cmd","/c", "start", "cmd", "/c","${file_path}/${file_base_name} & pause"]
}
]
}

java

{
    "cmd": ["cmd","/c","javac -encoding gbk -d . ${file}"],
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "selector": "source.java",
    "encoding":"gbk",
    "variants": [{
        "name": "Run",
        "shell": true,
        "encoding":"gbk",
        "cmd": ["start", "cmd", "/c", "java ${file_base_name} & pause"],
        "working_dir": "${file_path}",
    }]
}

lua

{
    "cmd": ["cmd","/c","start","cmd","/c","lua ${file} & pause"],
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.lua",
}

php

{
    "cmd": ["cmd","/c","start","cmd","/c", "C:/wamp/bin/php/php5.5.12/php.exe $file & pause"],
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "selector": "source.php",
    "encoding":"gbk"
}

python

{
    "cmd": ["cmd","/c","start","cmd","/c","python ${file} & pause"],
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.py",
}

ruby

{
    "cmd": ["cmd","/c","start","cmd","/c","ruby ${file} & pause"],
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.rb",
}

 

sublime搭建c++/java/lua/python/ruby的配置文件

标签:

原文地址:http://www.cnblogs.com/startnow/p/5045008.html

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