https://github.com/danielmartinus/intellij-codestyle-sync
Sync your codestyle with your JetBrains based IDE from a top level project folder
https://github.com/danielmartinus/intellij-codestyle-sync
Last synced: 4 months ago
JSON representation
Sync your codestyle with your JetBrains based IDE from a top level project folder
- Host: GitHub
- URL: https://github.com/danielmartinus/intellij-codestyle-sync
- Owner: DanielMartinus
- License: apache-2.0
- Created: 2017-02-02T09:58:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-02T18:28:24.000Z (over 9 years ago)
- Last Synced: 2025-10-25T04:09:15.410Z (8 months ago)
- Language: Java
- Homepage:
- Size: 12.7 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## IntelliJ code style sync
Sync your codestyle with your IntelliJ based IDE from a top level project folder and easily maintain it through git.
### Installation
The plugin is _not yet_ submitted to the IntelliJ repository because there is an alternative way to achieve this supported by JetBrains, [click here to read how](#alternative-way).
##### Download the plugin
Download the latest version from the release page of this repository: https://github.com/DanielMartinus/IntelliJ-codestyle-sync/releases
##### Load plugin in your IDE
Go to your preferences in your favorite JetBrains IDE and open the **Plugins** section. Choose **Install plugin from disk...** and choose the .zip file you just downloaded. *(don't need to unpack the zip file)*.
### How to use
Restart your IDE. A folder has been created called *.codestyles* at the top level of your project. Put any codestyle in that folder and it will automatically be synced with your codestyles.
*Sometimes the IDE might need a restart the first time for your codestyle to appear*
Choose your codestyle in **Preferences** > **Editor** > **Code Style** > *the code style should appear in the scheme list*
Each time someone updates the codestyle in your code repository it will automatically sync with the codestyle folder of your IDE. The plugin supports more than one codestyle.
#### Force sync code styles
Go to **tools** > **Sync code styles**
### Alternative way
Since there is a solution supported by JetBrains to share code style on project level and update it through git. I decided not to upload this plugin to the IntelliJ Plugin repository but open source it so others could learn from how to build a simple plugin.
1. Add your codestyle to the **.idea** folder of your project
2. Go to Editor > Code Style > and choose *Manage...* next to the the scheme chooser.
3. Select **Project**
From now on you are using the code style defined in the .idea folder.
If you want to maintain the codestyle through git you probably have to whitelist your codestyle in your .gitignore since most of the time the .idea folder is fully ignored.