31 plugins in category «Formatting»

Auto-Format Text

Adds to IntelliJ the ability to reformat text. This is particularly useful when editing Javadoc comments or files with free text paragraphs (like text files or XML document).

Bazel Build Formatter

An IntelliJ plugin to format Bazel's BUILD and WORKSPACE files using buildifier.

You must install buildifier separately.

Usage
=====
While on a BUILD or WORKSPACE file right-click and select "Format BUILD file". Alternatively use the shortcut Shift-Alt-K.

ChroMATERIAL

ChroMATERIAL is a color scheme that expresses the chromatic nature of Material Design within IntelliJ and Android Studio. In particular, ChroMATERIAL focuses on syntax highlighting of code within the IDE's code editor. It's uniqueness lies in the idea of enhance influence, not banality.

ClangFormatIJ

Runs clang-format on the statement or selection.

clang-format is a versatile and beautiful formatter for C++, proto, Java, JavaScript, and TypeScript.

This plugin does not contain clang-format itself, you must install it separately. clang-format is available in e.g. npm, or homebrew for Mac. This plugin also has no configuration, please use the regular .clang-format mechanism.

If you are using Mac OS X and have trouble getting it to run, please make sure to set your PATH environment in $HOME/.profile. Mac OS X seems to ignore $HOME/.bash_profile for applications launched from the Finder.

Code Style Hook

Plugin to apply the project's code style to a subset of the changed files on commit.

Css Alphabetical Rearranger

This plugin for sorting CSS properties in alphabetical order. To run rearrange your css file press Rearrange Code im Main Menu -> Code -> Rearrange Code. Also you can check Rearrange Entries in Reformat Code dialog (Ctrl+Alt+L).

CSSReorder (beta)

Very early version, use on your own risk. Stay tuned for updates.

A tool for sorting CSS properties in specific order (for now using default order as defined on http://csscomb.ru/online/).

Feel free to contribute: https://github.com/anton-rudeshko/CSSReorder

Eclipse Code Formatter

By meo
Allows using Eclipse's code formatter directly from IntelliJ.
Solves the problem of maintaining a common code style in team environments where both IDEA and Eclipse are used.

Go to https://github.com/krasa/EclipseCodeFormatter#instructions for instructions how to use it.

Currently supports formatting of
-Java (Eclipse 4.5 (requires JRE 1.7) and 4.4 libs, also emulates Eclipse's imports optimizing)
-C/C++ (Eclipse 4.5 (requires JRE 1.7))
-JavaScript (Eclipse 4.4)
-GWT (Eclipse 4.4)

Small donations are welcomed.

External Code Formatter

Allows using external code formatters, especially Eclipse's code formatter, as well as any command line code formatting tools, from within IntelliJ IDEA. Solves the problem of maintaining a common code style in team environments where both IDEA and Eclipse are used.

google-java-format

Formats Java source code to comply with Google Style.

Gradle Dependencies Formatter

Features
  • Convert a string notation to a map notation
  • Convert a map notation to a string notation
  • Sort dependencies
  • Paste a Maven dependency as a Gradle dependency

i18n-Formatter

Add Format Messages.properties action in Edit menu to format the current opened message.property-file.

Jalopy for IDEA 8

Integrates Jalopy into IDEA. Jalopy is a java code beautifier. The plugin will call IDEA defaut reformat function for non-java files. This is completley based on the older jalopy plugin for idea.jalopy. This version just adds a small bug fix and support for java 5.

Jalopy Plugin

Jalopy Code Formatter Plugin

Use Ctrl+Shift+P to format currently active document, or alternatively, enable automatic formatting on save in plugin configuration.

Compatibility

Compatible with IntelliJ IDEA 12.

Source Code

Github: http://github.com/ahanin/intellij-jalopy-plugin

Jalopy Plugin for Idea 10

Updated Jalopy plugin for newer versions of IntelliJ

Jindent - Source Code Formatter

Jindent is a powerful source code formatter for Java which empowers you to transform any foreign Java source code to meet your preferred coding style or any common Java code convention. Furthermore Jindent can format, generate and complete Javadoc comments on demand.

JSON Formatter

A simple formatter for JSON, based on JSON Tools and RSyntaxTextArea.

LayoutFormat

this is a plugin for android Layout formatting,you can use this plugin to farmat you layout.xml; it can make you layout.xml more beautiful. it will creat new string values in values/strings.xml and dimen values in values/dimens.xml for those hard_coded in layout.xml. Any question,please sent me emails to contact. My email address: 920621870@qq.com
http://www.jianshu.com/p/87a413d7c8a7

PHP Lambda Folding

Plugin folds one-line closures into more concise form and provides some type inference for closure arguments. Closure body must consist of one return statement enclosing expression.

PhpStorm phpfmt

Plugin to format PHP code

Pipe Table Formatter

Small plugin for formatting text blocks that represents a table delimited by pipe (|). For example, can be used to format JBehave examples table.

Supported delimiters: pipe, comma, tab. When formatting, any of supported delimiters are replaced with pipe.

Usage
Select text in the editor or place caret inside a table and choose action "Pipe Table" -> "Format" in Code menu or in editor popup menu.

Pom sorter

Sorts contents of maven project descriptor

Rearranger

Rearranges (reorders) class and class member declarations according to a user-specified order and/or method call hierarchy; generates section-marking comments; provides several controls for spacing within and between methods and classes; and permits the user to manually rearrange items.

Reformat

ReformatCode (Ctrl-Alt-L) and OptimizeImports (Ctrl-Alt-O) without a dialog. An additional action: ReformatPlugin.ReformatCodeAndOptimizeImports (Ctrl-Alt-R).

Reformat++

By cablo
(Ctrl+Alt+R) reformats actual file and optimizes imports without any dialog. (Ctrl+doubleClik) on javadoc word will toggle code around it. Works from IDEA 8 only.

Scala Imports Organizer

Best-effort imports organization for Scala.

Note that IntelliJ 13.1 added in-house support for Scala import organization, so you probably shouldn't use this plugin anymore. It still works, though.

Scalafmt

Code formatter for Scala.

Scalariform

Formats Scala sources using Scalariform.

Son of External Code Formatter

Allows using external code formatters, especially Eclipse's code formatter, as well as any command line code formatting tools, from within IntelliJ IDEA. Solves the problem of maintaining a common code style in team environments where both IDEA and Eclipse are used.

Tabifier

The tabifier plugin retabs Java code so that syntactic elements are aligned vertically. Extensive, configurable control over alignment is provided. [Note: the following examples are aligned correctly when viewed within IDEA's plugin manager, but are misaligned when viewed on the JetBrains plugin repository page due to the use of a non-fixed font.]

For example, I like to align variable declarations and assignment statements like this:

               int          v1;                  // loop variable
               String       s2;                  // second string
public  static PrintWriter  p;
private static boolean      debugging    = true; // initialize
private static OutputStream outputstream = null;

outputstream = new FileOutputStream(f, true);
p            = new DebuggingPrintWriter(outputstream, true);
        
IDEA likes to format them with single spaces separating the syntactic elements, like this:
int v1; // loop variable
String s2; // second string
public static PrintWriter p;
private static boolean debugging = true; // initialize
private static OutputStream outputstream = null;

outputstream = new FileOutputStream(f, true);
p = new DebuggingPrintWriter(outputstream, true);
        
The tabifier plugin automatically reformats the text into the first version, or any variation of it you choose.

The Tabifier is able to right justify integer literals, e.g.

public static final int ONE    =  1;
public static final int TWO    =  2;
public static final int TEN    = 10;
public static final int ELEVEN = 11;
        
It can align method declaration and method call parameters, even with multiple parameters per line:
public ExpressionListParser(TokenColumn       openParend,
                            ColumnChoice      params,
                            TokenColumn       closeParend,
                            CodeStyleSettings codeStyleSettings, TabifierSettings settings,
                            NestedParser      parser,            int              nestingLevel)
        
And its expression alignment is recursive, e.g.
if ((psiExpressionList.getExpressions().length               >  expressionListIndex &&
     psiExpressionList.getExpressions()[expressionListIndex] == child                 ) ||
    (sawNoParameters                                         == false               &&
     expressionListIndex                                     >                    0   )   )
        
It is capable of reformatting "if" statements as follows:
if (param1 == p3 &&
    j      >  5     ) p3 = 7;
....
if      (param1 == p3) p3     = 6;
else if (param1 == 2 ) method1(param1, true, 3);
else                   param1 = 7;
        
Method calls can be reformatted to align parentheses, commas, or parameters:
align_params                    = (ColumnSetting ) find(ALIGN_PARAMS              );
align_semicolon                 = (ColumnSetting ) find(ALIGN_SEMICOLON           );
align_semicolon_with_comma      = (BooleanSetting) find(ALIGN_SEMICOLON_WITH_COMMA);
        
Typecast parentheses and types as well as many other expression components can also be aligned.

Voorkantifyer

Applies DVK coding convention to a Java-file