Windows下Sublime Text 2常用配置

Package Control

import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

Cpp

整体替换C++.sublime-build为以下内容

{
	"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
	"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
	"working_dir": "${file_path}",
	"selector": "source.c, source.c++",

	"variants":
	[
		{
			"name": "Run",
			"cmd": [ "${file_path}/${file_base_name}.exe" ]
		}
	]
}

Java

整体替换JavaC.sublime-build为以下内容

{
	"cmd": ["runJava.bat", "$file"],
	"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
	"selector": "source.java",
	"encoding": "cp936"
}
在JDK的bin目录下将以下内容保存为runJava.bat

@ECHO OFF 
cd %~dp1 
ECHO Compiling %~nx1.......
IF EXIST %~n1.class ( 
DEL %~n1.class 
) 
javac -encoding utf-8 %~nx1 
IF EXIST %~n1.class ( 
ECHO -----------OUTPUT----------- 
java -classpath .; %~n1 
)

Python

Clojure

LaTeX

 

你可能感兴趣的:(Windows下Sublime Text 2常用配置)