Skip to content

Custom configuration for IntelliJ IDEA - code styles, live templates, etc

License

Notifications You must be signed in to change notification settings

choonchernlim/intellij-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intellij-config

Custom configuration for IntelliJ IDEA - code styles, file templates, live templates.

JavaScript's code style is based on the popular Airbnb's JavaScript style guide.

Installation

Shut down IntelliJ IDEA.

Depending on the operating system, go to the IntelliJ IDEA's configuration directory:-

  • Windows: ~\.IntelliJIdeaXX\config
  • Linux: ~/.IntelliJIdeaXX/config
  • OS X: ~/Library/Preferences/IntelliJIdeaXX

Under the configuration directory, replace the following subdirectories:-

<INTELLIJ-IDEA-CONFIG_DIR>
├── codestyles           <--- Replace this dir
├── colors
├── componentVersions
├── consoles
├── eval
├── extensions
├── fileTemplates        <--- Replace this dir
├── ideTalk
├── inspection
├── javascript
├── jdbc-drivers
├── options
├── quicklists
├── tasks                
├── templates            <--- Replace this dir
└── trp

Start IntelliJ IDEA.

Upon IntelliJ IDEA restart, you may need to select the code style from the Settings / Preferences Dialog.

Code Styles Usage

Alt + Cmd + L (Mac) and Alt + Ctrl + L (Windows).

Live Templates Usage

Groovy - Spock

Shortcut Description
def + <Tab> Spock - def given when then

JavaScript

Shortcut Description
cl + <Tab> console.log(..)
af + <Tab> ES6 - arrow function : (..) => { .. }
de + <Tab> ES6 - describe(..)
it + <Tab> ES6 - it(..)