This repository contains snippets files for various programing languages.
In the first step, all of snippets was converted from vim-snippets and bootstrap-snippets - that using snipMate format. I am very happy if someone contribute with me to improve it better!
- Clone this repository to your local environment
git clone https://github.com/khoinv/intellij-snippets.git
cd IntelliJ-snippets && git submodule update --init --recursive
- Copy all of file in intellij-snippets/resources/templates/* to your templates folder depend on your OS
- Live templates are stored in the following location:
- Windows: <your_user_home_directory>.IntelliJ IDEA<version_number>\config\templates
- Linux: ~IntelliJ IDEA\config\templates
- OS X: ~/Library/Preferences/IntelliJ IDEA/templates
- Restart IntelliJ Editor if it is running
- Type snippet name fllowed by pressing Tab or Enter to get template code. If snippets list do not show up press
<CMD>J
. - To move between variable locations in tamplate code you can use
<Tab>
or<Enter>
. But if emmet mode is enabled, when you typeabc<Tab>
it will be converted to a html tag like<abc></abc>
, so you shoud you<Enter>
instead of<Tab>
to swich between variable locations.
- IntelliJ IDEA(EC and Ultimate)(tested)
- WebStorm and PhpStorm(not tested)
- PyCharm(not tested)
- RubyMine(not tested)
- angular.md
- bootstrap.md
- codeigniter.md
- css.md
- django.md
- eruby.md
- go.md
- html.md
- java.md
- javascript-d3.md
- javascript.md
- javascript2.md
- javascritp.es6.md
- jquery.md
- laravel.md
- markdown.md
- node.md
- php.md
- rails.md
- react.md
- ruby.md
- sass.md
- scala.md
- sql.md
- In vim-snippets repository has various snippets language, and you can convert it to intelliJ snippet if you need.
- Using convert(inFile, outFile, prefix, language, [supportLanguages]) in convert.py
- SupportLanguages OPTIONS
- HTML
- XML
- JSON
- JAVA_CODE
- CSS
- CUCUMBER_FEATURE_FILE
- JAVA_SCRIPT
- TypeScript
- SQL
- ColdFusion
- PHP
- GROOVY
- MAVEN
- ASPECTJ
- ACTION_SCRIPT
- MXML
- CoffeeScript
- JSP
- OGNL
- GSP
- SCALA
- SBT
- SSP
- KOTLIN
- HAML
- Python
- Django
- RUBY
- RHTML
- GO
- Note: If you want make a snippet that support all languages, let supportLanguages value is 'OTHER'
- Change prefix to what you want, prefix option can be empty
- Make it become a Plugin