zoukankan      html  css  js  c++  java
  • sublime搭建c++/java/lua/python/ruby的配置文件

    本人电脑win7 64位

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

    c++

    {
    "working_dir": "$file_path",
    "cmd": "g++ -Wall -fexec-charset=GBK "$file_name" -o "$file_base_name"",
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "selector": "source.c",

    "variants":
    [
    {
    "name": "Run",
    "shell_cmd": "g++ -Wall -fexec-charset=GBK "$file" -o "$file_base_name" && 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",
    }
  • 相关阅读:
    TOJ 2776 CD Making
    int型、long型和long long型
    Hadoop HA- hadoop集群部署
    大数据之路- Hadoop环境搭建(Linux)
    Hadoop HA- zookeeper安装配置
    Zookeeper- Error contacting service. It is probably not running解决方案和原理
    大数据- 自定义Log4j日记
    Hadoop- Hadoop环境搭建
    域名解析
    JAVA- JDBC之DBHelper
  • 原文地址:https://www.cnblogs.com/startnow/p/5045008.html
Copyright © 2011-2022 走看看