Skip to content

Commit 1c96c5b

Browse files
authored
Merge pull request #11 from noniq/insert-code-block
Add snippet for inserting a code block.
2 parents 8e97796 + 99d5f19 commit 1c96c5b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Provides some [GitHub Flavoured Markdown](https://help.github.com/articles/githu
33

44
## Features
55
- Add a new "Preview" command (overriding the existing Markdown preview) using [Redcarpet](https://github.com/vmg/redcarpet) to render GitHub Flavoured Markdown
6-
- Support triple-backtick raw blocks and support syntax highlighting for various languages (others can be added trivially)
6+
- Support triple-backtick raw blocks and support syntax highlighting for various languages (others can be added trivially). There’s also a tab trigger for inserting raw blocks: Just type a single backtick (<kbd>`</kbd>) and then hit the tab key.
77
- Support and highlight GitHub Flavoured Markdown strikethroughs, tables, references, checkboxes and italics
88

99
You can also use nicer fonts by installing the [GitHub Flavoured Markdown Font Settings bundle](https://github.com/mikemcquaid/GitHub-Markdown-Font-Settings.tmbundle).

Snippets/Code block.tmSnippet

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>content</key>
6+
<string>\`\`\`${1|bash,bib,c,c#,c++,cpp,csharp,css,go,html,inc,java,javascript,jruby,js,latex,macruby,node,php,python,rake,rb,rbx,ruby,rusthon,sh,shell,swift,tex,xhtml,zsh|}
7+
$0
8+
\`\`</string>
9+
<key>name</key>
10+
<string>Insert Code Block</string>
11+
<key>tabTrigger</key>
12+
<string>`</string>
13+
<key>uuid</key>
14+
<string>801405C3-C14D-4C1D-8353-AF6A54FED3D8</string>
15+
</dict>
16+
</plist>

0 commit comments

Comments
 (0)