├── .gitignore ├── Bootstrap.iml ├── LICENSE ├── META-INF └── plugin.xml ├── README.md ├── animation.gif ├── resources └── liveTemplates │ └── Bootstrap.xml └── src └── com └── jasonnz └── bootstrap └── BootstapTemplatesProvider.java /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /*.jar 3 | /out 4 | -------------------------------------------------------------------------------- /Bootstrap.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jason Morton 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /META-INF/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | com.jasonnz.bootstrap 3 | Bootstrap 4 | 0.1.1 5 | @JasonMortonNZ 6 | 7 | Bootstrap 3 live templates / snippets 9 |

GitHub Homepage

10 |
11 |

Follow me on Twitter: @JasonMortonNZ

12 | 13 | ]]>
14 | 15 | 17 | <
No changes so far...
18 |
19 | 20 | ]]> 21 |
22 | 23 | 24 | 25 | 26 | 28 | 29 | com.intellij.modules.lang 30 | com.intellij.modules.platform 31 | 32 | 33 | 34 | 35 | 36 | 37 |
-------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Bootstrap 3 WebStorm/PHPStorm Plugin 2 | ==================================== 3 | 4 | A WebStorm/PHPStorm plugin containing Bootstrap 3 live templates - lots of live template! 5 | 6 | ![Plugin in action](animation.gif) 7 | 8 | Feel free to let me know what else you want added via: 9 | 10 | - Twitter [@JasonMortonNZ](https://twitter.com/jasonmortonnz) 11 | - The [Issues](https://github.com/JasonMortonNZ/bootstrap3-phpstorm-plugin/issues) section on GitHub 12 | 13 | 14 | ### Intallation (in three easy steps) 15 | 16 | To install the plugin open your editor (WebStorm or PHPStorm) and hit: 17 | 18 | 1) `File > Settings > Plugins` and click on the `Browse repositories` button. 19 | 20 | 2) Search for `Bootstrap` then right click and select `Download plugin`. 21 | 22 | 3) Finally hit the `Apply` button, agree to restart your IDE and you're all done! 23 | 24 | 25 | ## What's included - contents 26 | - [CDN](#cdn) 27 | - [Templates](#templates) 28 | - [Forms](#forms) 29 | - [Tables](#tables) 30 | - [Input](#input-fields-form-fields) 31 | - [Alerts](#alerts) 32 | - [Badges](#badges) 33 | - [Breadcrumbs](#breadcrumbs) 34 | - [Buttons](#buttons) 35 | - [Grid](#grid) 36 | - [Images](#images) 37 | - [Icons](#icons) 38 | - [Labels](#labels) 39 | - [Pagination](#pagination) 40 | - [Navigation](#navigation) 41 | - [Panels](#panels) 42 | - [List Groups](#list-groups) 43 | - [Media Objects](#media-objects) 44 | - [Icons](#icons) 45 | - [Clearfix](#clearfix) 46 | - [License](#license) 47 | 48 | ### CDN 49 | 50 | | Component | Snippet code | 51 | |------------------------------- | :-----------------------------:| 52 | | CDN link (both CSS & JS) | bs3-cdn | 53 | | CDN link (CSS only) | bs3-cdn:css | 54 | | CDN link (JS only) | bs3-cdn:js | 55 | 56 | ### Templates 57 | 58 | | Component | Snippet code | 59 | |------------------------------- | :-----------------------------:| 60 | | HTML5 Template Layout | bs3-template:html5 | 61 | 62 | ### Forms 63 | 64 | | Component | Snippet code | 65 | |------------------------------- | :-----------------------------:| 66 | | Form | bs3-form | 67 | | Inline Form | bs3-form:inline | 68 | | Horizontal Form | bs3-form:horizontal | 69 | 70 | ### Tables 71 | 72 | | Component | Snippet code | 73 | |------------------------------- | :----------------------------: | 74 | | Table | bs3-table | 75 | | Bordered Table | bs3-table:bordered | 76 | | Condensed Table | bs3-table:condensed | 77 | | Hover Table | bs3-table:hover | 78 | | Striped Table | bs3-table:striped | 79 | 80 | ### Input Fields (Form fields) 81 | 82 | #### Currently Working 83 | 84 | | Component | Snippet code | Options | 85 | |------------------------------- | :----------------------------: | :-----: | 86 | | Text Input | bs3-input | :h | 87 | | Select Input | bs3-select | | 88 | | Checkbox | bs3-checkbox | | 89 | | Radio | bs3-radio | :h | 90 | | Submit | bs3-submit | :h | 91 | 92 | #### Coming Soon 93 | 94 | **Note:** you can add " :h " to the end of any input field snippet to make it compatible with Bootstrap 3 horizontal forms. **E.g.** 95 | - bs3-input:text:h 96 | - bs3-input:hidden:h 97 | 98 | | Component | Snippet code | Options | 99 | |------------------------------- | :----------------------------: | :-----: | 100 | | Label | bs3-input:label | | 101 | | Text Input | bs3-input:text | :h | 102 | | Email Input | bs3-input:email | :h | 103 | | Password Input | bs3-input:password | :h | 104 | | Hidden Input | bs3-input:hidden | :h | 105 | | Url Input | bs3-input:url | :h | 106 | | Color Input | bs3-input:color | :h | 107 | | Number Input | bs3-input:number | :h | 108 | | Range Input | bs3-input:range | :h | 109 | | Date Input | bs3-input:date | :h | 110 | | Week Input | bs3-input:week | :h | 111 | | Month Input | bs3-input:month | :h | 112 | | Time Input | bs3-input:time | :h | 113 | | Tel Input | bs3-input:tel | :h | 114 | | Search Input | bs3-input:search | :h | 115 | | Reset Input | bs3-input:reset | :h | 116 | | Submit Input | bs3-input:submit | :h | 117 | | Checkbox Input | bs3-input:checkbox | :h | 118 | | Radio Box Input | bs3-input:radio | :h | 119 | | Textarea | bs3-textarea | :h | 120 | 121 | ### Alerts 122 | 123 | | Component | Snippet code | 124 | |------------------------------- | :----------------------------: | 125 | | Alert Box (Default) | bs3-alert | 126 | | Danger Alert Box | bs3-alert:danger | 127 | | Info Alert Box | bs3-alert:info | 128 | | Success Alert Box | bs3-alert:success | 129 | | Warning Alert Box | bs3-alert:warning | 130 | 131 | ### Badges 132 | 133 | | Component | Snippet code | 134 | |------------------------------- | :----------------------------: | 135 | | Badge (Default) | bs3-badge | 136 | 137 | ### Breadcrumbs 138 | 139 | | Component | Snippet code | 140 | |------------------------------- | :----------------------------: | 141 | | Breadcrumbs | bs3-breadcrumbs | 142 | 143 | ### Buttons 144 | #### Buttons COMING SOON 145 | 146 | **Note:** all button snippets below can have any of the following options append to the end of the snippet *. 147 | - :danger 148 | - :default 149 | - :disabled 150 | - :info 151 | - :primary 152 | - :success 153 | - :warning 154 | 155 | **An example:** 156 | - bs3-button:success 157 | - bs3-large-button:disabled 158 | - bs3-block-button:warning 159 | 160 | | Component | Snippet code | Options | 161 | |------------------------------- | :----------------------------: | :-----: | 162 | | Button | bs3-button | * | 163 | | Block Button | bs3-block-button | * | 164 | | Mini Button | bs3-xs-button | * | 165 | | Small Button | bs3-sm-button | * | 166 | | Large Button | bs3-lg-button | * | 167 | 168 | ### Grid 169 | 170 | **Note:** The bs3-col snippet can be used both on its own or with the addition of a colon followed by the number of columns required: **E.g.** 171 | 172 | - bs3-col 173 | - bs3-col:6 174 | - bs3-col:12 175 | 176 | | Component | Snippet code | Options | 177 | |------------------------------- | :----------------------------: | :-----: | 178 | | Column | bs3-col | :1-12 | 179 | | Row | bs3-row | | 180 | | Container | bs3-container | | 181 | 182 | ### Icons 183 | 184 | | Component | Snippet code | 185 | |------------------------------- | :-----------------------------:| 186 | | Glyphicon | bs3-icon:glyphicon | 187 | | Icon (Font Awesome) | bs3-icon | 188 | 189 | ### Images 190 | 191 | | Component | Snippet code | 192 | |------------------------------- | :----------------------------: | 193 | | Thumbnail | bs3-thumbnail | 194 | | Thumbnail with content | bs3-thumbnail:content | 195 | 196 | ### Labels 197 | 198 | | Component | Snippet code | 199 | |------------------------------- | :----------------------------: | 200 | | Label | bs3-label | 201 | | Danger Label | bs3-label:danger | 202 | | Info Label | bs3-label:info | 203 | | Success Label | bs3-label:success | 204 | | Warning Label | bs3-label:warning | 205 | 206 | ### Pagination 207 | 208 | | Component | Snippet code | 209 | |------------------------------- | :----------------------------: | 210 | | Pager | bs3-pager | 211 | | Aligned Pager | bs3-pager:aligned | 212 | | Pagination | bs3-pagination | 213 | | Pagination:small | bs3-pagination:small | 214 | | Pagination:large | bs3-pagination:large | 215 | 216 | ### Navigation 217 | 218 | | Component | Snippet code | 219 | |------------------------------- | :----------------------------: | 220 | | Navbar (basic navbar) | bs3-navbar | 221 | | Navbar Brand Element | bs3-navbar:brand | 222 | | Navbar Button | bs3-navbar:button | 223 | | Navbar Form | bs3-navbar:form | 224 | | Navbar Link | bs3-navbar:link | 225 | | Navbar Text | bs3-navbar:text | 226 | | Navbar Fixed-Botton | bs3-navbar:fixed-bottom | 227 | | Navbar Fixed-Top | bs3-navbar:fixed-top | 228 | | Navbar Inverse | bs3-navbar:inverse | 229 | | Navbar Responsive | bs3-navbar:responsive | 230 | | Navbar Static-Top | bs3-navbar:static-top | 231 | 232 | ### Jumbotron 233 | 234 | | Component | Snippet code | 235 | |------------------------------- | :----------------------------: | 236 | | Jumbotron (ex Hero Unit) | bs3-jumbotron | 237 | 238 | ### Panels 239 | 240 | | Component | Snippet code | 241 | |------------------------------- | :----------------------------: | 242 | | Panel | bs3-panel | 243 | | Panel (contextual) | bs3-panel:{warning,success,info,danger,primary} | 244 | | Panel (with heading) | bs3-panel:heading | 245 | | Panel (with footer) | bs3-panel:footer | 246 | 247 | ### List-groups 248 | 249 | | Component | Snippet code | 250 | |------------------------------- | :----------------------------: | 251 | | List group | bs3-list-group | 252 | | List group (with badges) | bs3-list-group:badges | 253 | | List group (linked list) | bs3-list-group:linked | 254 | | List group (with content) | bs3-list-group:content | 255 | 256 | ### Media Objects 257 | 258 | | Component | Snippet code | 259 | |------------------------------- | :----------------------------: | 260 | | Media Object | bs3-media-object | 261 | 262 | ### Clearfix 263 | 264 | | Component | Snippet code | 265 | |------------------------------- | :----------------------------: | 266 | | Clearfix | bs3-clearfix | 267 | 268 | ### License 269 | 270 | Bootstrap 3 - PHPStorm Plugin is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). 271 | -------------------------------------------------------------------------------- /animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonMortonNZ/bootstrap3-phpstorm-plugin/a7d5ae7308e5a3311ead00a22d74d03488819724/animation.gif -------------------------------------------------------------------------------- /resources/liveTemplates/Bootstrap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 26 | 49 | 72 | 95 | 118 | 140 | 164 | 185 | 206 | 227 | 249 | 271 | 294 | 318 | 348 | 373 | 397 | 419 | 441 | 463 | 485 | 507 | 529 | 553 | 577 | 600 | 627 | 653 | 679 | 702 | 723 | 744 | 765 | 786 | 807 | 830 | 853 | 876 | 899 | 922 | 946 | 970 | 993 | 1021 | 1045 | 1067 | 1089 | 1110 | 1132 | 1154 | 1176 | 1200 | 1223 | 1248 | 1273 | 1297 | 1321 | 1345 | 1370 | 1393 | 1418 | 1440 | 1463 | 1484 | 1505 | 1526 | 1547 | 1568 | 1589 | 1610 | 1631 | 1652 | 1673 | 1694 | 1715 | 1736 | 1757 | 1782 | 1806 | 1831 | 1855 | 1879 | 1906 | 1936 | 1960 | 1987 | 2013 | 2037 | 2060 | -------------------------------------------------------------------------------- /src/com/jasonnz/bootstrap/BootstapTemplatesProvider.java: -------------------------------------------------------------------------------- 1 | package com.jasonnz.bootstrap; 2 | 3 | import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider; 4 | import org.jetbrains.annotations.Nullable; 5 | 6 | /** 7 | * Created by jason on 6/02/14. 8 | */ 9 | public class BootstapTemplatesProvider implements DefaultLiveTemplatesProvider { 10 | @Override 11 | public String[] getDefaultLiveTemplateFiles() { 12 | return new String[]{"liveTemplates/Bootstrap"}; 13 | } 14 | 15 | @Nullable 16 | @Override 17 | public String[] getHiddenLiveTemplateFiles() { 18 | return null; 19 | } 20 | } 21 | --------------------------------------------------------------------------------