你想要用文學編程來寫程式嗎?我們先來做一個列出 1 至 10 的簡單程式吧!
我們需要做一些宣告、接著以迴圈產出一個數字的陣列,最後才能列印出 1 至 10 的數字。
start = 1
end = 10
root = true | |
[*.js] | |
indent_style = space | |
indent_size = 4 | |
trim_trailing_whitespace = true | |
insert_final_newline = true | |
quote_type = double | |
spaces_around_operators = true | |
space_after_control_statements = true |
/* | |
* Layout system. | |
* | |
* .grid-full - 1 column | |
* .grid-nav - 2 columns | |
* .grid-compact - 3 columns | |
*/ | |
$width : 65% | |
$min-width : 980px |
@import susy | |
$total-columns: 49 | |
$column-width: 20px | |
$gutter-width: 0px | |
$grid-padding: 0px |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Position</title> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<link href="" rel="stylesheet"> | |
<style type="text/css"> |
/** | |
* JSHint options: http://www.jshint.com/docs/#options | |
*/ | |
{ | |
"bitwise": true, | |
//"camelcase": true, | |
"curly": true, // Disallows curly. | |
"eqeqeq": true, | |
"forin": true, | |
"immed": true, |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="author" content="josephj"> | |
<meta name="created" content="2013-04-10"> | |
<title>Focus Auto Scroll</title> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/3.7.2/build/cssreset/reset-min.css"> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/3.7.2/build/cssfonts/fonts-min.css"> | |
<script type="text/javascript" src="http://yui.yahooapis.com/3.7.2/build/yui/yui-min.js"></script> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>XMLHttpRequest Cross Domain</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<style type="text/css"> | |
</style> | |
</head> | |
<body> |
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' |