Syntax highlighting in fenced code blocks
Python
@requires_authorization
def somefunc(param1='', param2=0):
r'''A docstring'''
if param1 > param2: # interesting
print 'Gre\'ater'
return (param2 - param1 + 1 + 0b10l) or None
class SomeClass:
pass
# note
>>> message = '''interpreter
... prompt'''
SQL
BEGIN;
CREATE TABLE "topic" (
-- This is the greatest table of all time
"id" serial NOT NULL PRIMARY KEY,
"forum_id" integer NOT NULL,
"subject" varchar(255) NOT NULL -- Because nobody likes an empty subject
);
ALTER TABLE "topic" ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id") REFERENCES "forum" ("id");
-- Initials
insert into "topic" ("forum_id", "subject") values (2, 'D''artagnian');
/*
-- this line lacks ; at the end to allow people to be sloppy and omit it in one-liners
*/
COMMIT
Ruby
class A < B; def self.create(object = User) object end end
class Zebra; def inspect; "X#{2 + self.object_id}" end end
module ABC::DEF
include Comparable
# @param test
# @return [String] nothing
def foo(test)
Thread.new do |blockvar|
ABC::DEF.reverse(:a_symbol, :'a symbol', :<=>, 'test' + ?\012)
answer = valid?4 && valid?CONST && ?A && ?A.ord
end.join
end
def [](index) self[index] end
def ==(other) other == self end
end
class Car < ActiveRecord::Base
has_many :wheels, class_name: 'Wheel', foreign_key: 'car_id'
scope :available, -> { where(available: true) }
end
hash = {1 => 'one', 2 => 'two'}
2.0.0p0 :001 > ['some']
=> ["some"]
HTML, XML
<?xml version="1.0"?>
<response value="ok" xml:lang="en">
<text>Ok</text>
<comment html_allowed="true"/>
<ns1:description><![CDATA[
CDATA is <not> magical.
]]></ns1:description>
<a></a> <a/>
</response>
<!DOCTYPE html>
<title>Title</title>
<style>body {width: 500px;}</style>
<script type="application/javascript">
function $init() {return true;}
</script>
<body>
<p checked class="title" id='title'>Title</p>
<!-- here goes the rest of the page -->
</body>
Syntax highlighting in fenced code blocks的更多相关文章
- [VSCode] Adding Custom Syntax Highlighting to a Theme in VSCode
VSCode Themes are a quick way to update the color scheme and syntax highlighting of your code, but y ...
- code::blocks的快捷键汇总
编辑部分: Ctrl + A:全选 Ctrl + C:复制 Ctrl + X: 剪切 Ctrl + V:粘贴 Ctrl + Z:撤销 Ctrl + S:保存 Ctrl + Y / Ctrl + S ...
- code blocks 快捷键
设置快捷键可以在setting-Editor-keyboard shortcuts里设置 ==日常编辑== • 按住Ctrl滚滚轮,代码的字体会随你心意变大变小.• 在编辑区按住右键可拖动代码,省去拉 ...
- Code::Blocks 配置
需要另外下载安装GCC编译器 配置主题皮肤: 先替换' default.conf ' (需要关闭code::blocks) Settings>Editor>(左栏)Syntax highl ...
- Code::Blocks代码自动提示设置及常用快捷键
Code::Blocks代码自动提示设置及常用快捷键(适用windows和linux) 1)以下需要设置的地方均在Settings->Editor...弹出的对话框中. 2)不少命令都可针对当前 ...
- Code::Blocks项目配置基础
File 菜单 New :新建( Empty file/file . class . project . build target ) . Recent projects/files :近期打开的项目 ...
- PGI Compiler for OpenACC Output Syntax Highlighting
PGI Compiler for OpenACC Output Syntax Highlighting When use the PGI compiler to compile codes with ...
- How to turn on syntax highlighting in osx
put follow code in ~/.vimrc set ai " auto indenting set history=100 " keep 100 lines of hi ...
- 从Script到Code Blocks、Code Behind到MVC、MVP、MVVM
刚过去的周五(3-14)例行地主持了技术会议,主题正好是<UI层的设计模式——从Script.Code Behind到MVC.MVP.MVVM>,是前一天晚上才定的,中午花了半小时准备了下 ...
随机推荐
- HDU 4605 Magic Ball Game (dfs+离线树状数组)
题意:给你一颗有根树,它的孩子要么只有两个,要么没有,且每个点都有一个权值w. 接着给你一个权值为x的球,它从更节点开始向下掉,有三种情况 x=w[now]:停在此点 x<w[now]:当有孩子 ...
- html学习第一天笔记——第六章节
<input type="reset" value="重置"> 使用重置按钮,重置表单信息<input type="submit&q ...
- Gym100947E || codeforces 559c 组合数取模
E - Qwerty78 Trip Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u S ...
- 2016 Multi-University Training Contest 1 F.PowMod
PowMod Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Su ...
- 玩转AR,联想将在2017年推出第二款Tango AR手机
今年6月份,联想与谷歌合作推出了全球首款消费级AR手机Phab2 Pro,并获得很大的关注.作为谷歌Project Tango的一部分,这款手机的最大亮点是它搭载了三颗后置摄像头和多个传感器,机身背面 ...
- 数论 - Pairs(数字对)
In the secret book of ACM, it’s said: “Glory for those who write short ICPC problems. May they live ...
- mysql like 贪婪匹配 同时匹配多个值
LIKE "%a%b%c%",这样匹配出的就是包含a,b,c三个关键词的记录 (三个关键词不在一起时) 不好用 mysql> select count(1) from dm ...
- EaseMode
The following graphs demonstrate the different values of EasingMode, where f(t) represents the anima ...
- spark 2.0 Vector toBreeze
def toBreeze( _v : Vector ) : BZV[Double] = { _v match { case x : org.apache.spark.mllib.linalg.Dens ...
- 判断.NET4.0是否安装
Clinet 和 Full存在一个都说明安装了Framework "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client"&qu ...