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.
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
.
Alt + Cmd + L
(Mac) and Alt + Ctrl + L
(Windows).
Shortcut | Description |
---|---|
def + <Tab> |
Spock - def given when then |
Shortcut | Description |
---|---|
cl + <Tab> |
console.log(..) |
af + <Tab> |
ES6 - arrow function : (..) => { .. } |
de + <Tab> |
ES6 - describe(..) |
it + <Tab> |
ES6 - it(..) |