├── README.md ├── a.sublime-snippet ├── b.sublime-snippet ├── bq.sublime-snippet ├── code.sublime-snippet ├── h1.sublime-snippet ├── h2.sublime-snippet ├── h3.sublime-snippet ├── h4.sublime-snippet ├── h5.sublime-snippet ├── h6.sublime-snippet ├── hr.sublime-snippet ├── i.sublime-snippet ├── img.sublime-snippet ├── messages.json ├── messages ├── 2.0.0.txt ├── 2.1.0.txt ├── install.txt └── license ├── ol.sublime-snippet ├── pre.sublime-snippet ├── strike.sublime-snippet ├── table.sublime-snippet └── ul.sublime-snippet /README.md: -------------------------------------------------------------------------------- 1 | # GitHub Markdown Snippets 2 | Helpful Sublime Text snippets to get you started with GitHub flavored Markdown by letting you type the plain old HTML tags. 3 | 4 | ## Installation 5 | 6 | ### Via Package Control 7 | The easiest way is to install it via [Package Control](https://packagecontrol.io/). 8 | 9 | - Go to **Command Palette** Ctrl + Shift + P or + Shift + P 10 | - Select **Package Control : Install Package** 11 | - Search for **Github Markdown Snippets** 12 | 13 | ### Manual 14 | 15 | - Clone the repository or download the [ZIP](https://github.com/praveenpuglia/github-markdown-snippets/archive/master.zip) 16 | - Extract the archive 17 | - Put it in your **Packages**( `Preferences > Browse Packages...` ) directory. 18 | 19 | ### Using with Emmet 20 | If you have Emmet installed, tab triggers may not function as expected due to [this](https://github.com/sergeche/emmet-sublime#tab-key-handler). 21 | 22 | To get around the problem, go to 23 | ``` 24 | Preferences > Package Settings > Emmet > User Settings 25 | ``` 26 | and add the following in your settings file. 27 | 28 | ``` 29 | { 30 | "disable_tab_abbreviations_for_scopes": "text.html.markdown" 31 | } 32 | ``` 33 | 34 | This should let markdown snippets take precedence over emmet's tab to expand abbreviations feature and provide correct snippets. 35 | 36 | Note that any tab trigger not set by this plugin will be converted to HTML tags which is convenient for people 37 | who want to use HTML tags inside Markdown files. 38 | 39 | ## Usage 40 | A consolidated guide is available [here](http://praveenpuglia.github.io/github_markdown_snippets). 41 | 42 | Type a tag name and hit tab. That's it! :relaxed: 43 | 44 | :snowflake: Long tags like `blockquote` are shortened for power use. 45 | 46 | ## List of Tab Triggers 47 | 48 | ``` 49 | h1 // Heading 1 50 | h2 // Heading 2 51 | h3 // Heading 3 52 | h4 // Heading 4 53 | h5 // Heading 5 54 | h6 // Heading 6 55 | ``` 56 | # Heading 1 57 | ## Heading 2 58 | ### Heading 3 59 | #### Heading 4 60 | ##### Heading 5 61 | ###### Heading 6 62 | ``` 63 | b // Bold 64 | i // Italic 65 | bq // Blockquote 66 | strike // Strikeout 67 | hr // Horizontal Rule, Divider 68 | ``` 69 | **Bold Text** 70 | 71 | *Italic Text* 72 | 73 | > Put a nice, beautiful 74 | > quote here... 75 | 76 | ~~Strike Through~~ 77 | 78 | --- 79 | 80 | ``` 81 | code // Inline Code 82 | pre // Code Block with language based highlighting. 83 | ``` 84 | `Inline Code Snippet` 85 | 86 | ```javascript 87 | var message = "Code Block"; 88 | alert( message ); 89 | ``` 90 | 91 | ``` 92 | a // Anchor 93 | img // Image 94 | ``` 95 | [Link Title](Link) 96 | 97 | ![Puppies are cute](https://c1.staticflickr.com/5/4112/5170590074_714d36db83_b.jpg) 98 | 99 | ``` 100 | ol // Ordered List 101 | ul // Unordered List 102 | table // Table 103 | ``` 104 | 105 | 1. First Item 106 | 2. Second Item 107 | 3. Third Item 108 | 109 | 110 | - I 111 | - Love 112 | - Markdown 113 | 114 | | Column 1 | Column 2 | 115 | | ------------- | ------------- | 116 | | Cell 1-1 | Cell 1-2 | 117 | | Cell 2-1 | Cell 2-2 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /a.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | a 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /b.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | b 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /bq.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | ${1:Put a nice, beautiful} 4 | > ${2:quote here...} 5 | ${0} 6 | ]]> 7 | 8 | bq 9 | 10 | text.html.markdown 11 | 12 | -------------------------------------------------------------------------------- /code.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | code 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /h1.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | h1 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /h2.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | h2 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /h3.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | h3 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /h4.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | h4 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /h5.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | h5 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /h6.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | h6 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /hr.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | hr 8 | 9 | text.html.markdown 10 | 11 | -------------------------------------------------------------------------------- /i.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | i 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /img.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | img 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "install":"messages/install.txt", 3 | "2.0.0":"messages/2.0.0.txt", 4 | "2.1.0":"messages/2.1.0.txt" 5 | } -------------------------------------------------------------------------------- /messages/2.0.0.txt: -------------------------------------------------------------------------------- 1 | ✿ Version 2.0.0 2 | From this version onwards, you don't need to use the "m" prefix. It's now aligned with how 3 | Atom works with markdown files. You just need to type the HTML tag name and hit tab. Here's 4 | the updates tag triggers for convenience. 5 | 6 | 〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜 7 | List of Tab Triggers 8 | 〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜 9 | h1 // Heading 1 10 | h2 // Heading 2 11 | h3 // Heading 3 12 | h4 // Heading 4 13 | h5 // Heading 5 14 | h6 // Heading 6 15 | b // Bold 16 | i // Italic 17 | bq // Blockquote 18 | strike // Strikeout 19 | hr // Horizontal Rule, Divider 20 | code // Inline Code 21 | pre // Code Block with language based highlighting. 22 | a // Anchor 23 | img // Image 24 | ol // Ordered List 25 | ul // Unordered List 26 | table // Table -------------------------------------------------------------------------------- /messages/2.1.0.txt: -------------------------------------------------------------------------------- 1 | ✿ Version 2.1.0 2 | 〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜 3 | This version comes up with instructions to solve the tab trigger issues when used with Emmet. 4 | Due to [this](https://github.com/sergeche/emmet-sublime#tab-key-handler), some tab triggers 5 | result in html elements instead of proper Markdown snippets. 6 | 7 | To get around the problem, go to 8 | Preferences > Package Settings > Emmet > User Settings 9 | and add the following in your settings file. 10 | 11 | ``` 12 | { 13 | "disable_tab_abbreviations_for_scopes": "text.html.markdown" 14 | } 15 | ``` 16 | 17 | This should let markdown snippets take precedence over emmet's tab to expand abbreviations feature and provide correct snippets. 18 | 19 | Note that any tab trigger not set by this plugin will be converted to HTML tags which is convenient for people 20 | who want to use HTML tags inside Markdown files. 21 | 22 | 〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜 23 | List of Tab Triggers 24 | 〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜 25 | h1 // Heading 1 26 | h2 // Heading 2 27 | h3 // Heading 3 28 | h4 // Heading 4 29 | h5 // Heading 5 30 | h6 // Heading 6 31 | b // Bold 32 | i // Italic 33 | bq // Blockquote 34 | strike // Strikeout 35 | hr // Horizontal Rule, Divider 36 | code // Inline Code 37 | pre // Code Block with language based highlighting. 38 | a // Anchor 39 | img // Image 40 | ol // Ordered List 41 | ul // Unordered List 42 | table // Table -------------------------------------------------------------------------------- /messages/install.txt: -------------------------------------------------------------------------------- 1 | ☀☀☀☀☀☀ Thanks for Github Markdown Snippets! (✿✪‿✪。)ノ ☀☀☀☀☀☀☀ 2 | ✿ To report bugs and request features - https://github.com/praveenpuglia/github_markdown_snippets 3 | 4 | 〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜 5 | Usage 6 | 〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜 7 | A consolidated guide is available at - http://praveenpuglia.github.io/github_markdown_snippets 8 | 9 | Type a tag name and hit tab. That's it! 。◕‿◕。 10 | 11 | ✿ Long tags like `blockquote` are shortened for power use. 12 | 13 | 〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜 14 | List of Tab Triggers 15 | 〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜 16 | h1 // Heading 1 17 | h2 // Heading 2 18 | h3 // Heading 3 19 | h4 // Heading 4 20 | h5 // Heading 5 21 | h6 // Heading 6 22 | b // Bold 23 | i // Italic 24 | bq // Blockquote 25 | strike // Strikeout 26 | hr // Horizontal Rule, Divider 27 | code // Inline Code 28 | pre // Code Block with language based highlighting. 29 | a // Anchor 30 | img // Image 31 | ol // Ordered List 32 | ul // Unordered List 33 | table // Table 34 | -------------------------------------------------------------------------------- /messages/license: -------------------------------------------------------------------------------- 1 | Copyright 2017 Praveen Puglia 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /ol.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | ol 10 | 11 | text.html.markdown 12 | 13 | -------------------------------------------------------------------------------- /pre.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | pre 10 | 11 | text.html.markdown 12 | 13 | -------------------------------------------------------------------------------- /strike.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | strike 7 | 8 | text.html.markdown 9 | 10 | -------------------------------------------------------------------------------- /table.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | table 11 | 12 | text.html.markdown 13 | 14 | -------------------------------------------------------------------------------- /ul.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | ul 10 | 11 | text.html.markdown 12 | 13 | --------------------------------------------------------------------------------