No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bootstrap-snippets @ 3260e07 add bootstrap snippet Dec 11, 2016
intellij-snippets/resources
screencasts add screencasts Dec 23, 2016
vim-snippets @ 0a66dc7 add some snippets Dec 16, 2016
.gitmodules add some snippets Dec 16, 2016
README.md update README Jan 18, 2017
convert.py

README.md

IntelliJ-snippets

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!

Screencasts

bootstrap.gif

How to use

  • 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 type abc<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.

This template may be works for the following JetBrains products

  • IntelliJ IDEA(EC and Ultimate)(tested)
  • WebStorm and PhpStorm(not tested)
  • PyCharm(not tested)
  • RubyMine(not tested)

Snippets list

How to customize my snippets style

  • 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

TODO

  • Make it become a Plugin