Sublime Build C++/java/lua/python/ruby configuration file

Source: Internet
Author: User
Tags lua



My Computer Win7 64-bit



In advance to install the convert to Utf-8 plugin, compile and run garbled, the combination of key ctrl+shift+c the source file to GBK encoding. Still garbled, restart Editor | computer | re-edit the Chinese section.



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 Build C++/java/lua/python/ruby configuration file


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.