39 plugins in category «Formatting»
Modern JVM languages such as Kotlin, Groovy, Scala and some others offer many language features that let you write code in a more concise and expressive manner. These features include type inference, properties, interpolated string, range and tuple literals, enhanced operators, clojures, implicits, smart casts and many more.
This plugin extends the IDE’s folding features to emulate some of these modern languages’ features helping fight verbosity.
For more information, read the blog post.
To get access to experimental features, go to Settings | Plugins | Browse Repositories | Manage Repositories and add https://plugins.jetbrains.com/plugins/EAP/com.intellij.bigdecimal-folding as a custom plugin repository URL.
For more clarity, you may try to adjust your color scheme: go to Settings | Editor | Colors & Fonts | General, select Folded text, uncheck the Background color, and change the Foreground color to #000091 for the default scheme and #7CA0BB for Darcula.To disable certain types of folding, go to Settings | Editor | General | Code Folding.
- Configurable 'ANSI Aware' file extensions:
- Go to Preferences | Editor | File Types
- Under 'Recognized File Types' select 'ANSI Aware'
- Under 'Registered Patterns' add your custom 'ANSI Aware' file name patterns, *.log is added by default
- Don't forget to hit the 'Apply' button
- Switch between Preview and Edit mode:
- Right click on the editor
- Press 'Switch to Edit/Preview Mode'
- Alternatively use the shortcut 'ctrl meta A' while on the editor
- Only the below graphic rendition codes are supported:
- Reset code (0)
- Bold code (1)
- Italic code (3)
- Single Underline code (4)
- All text foreground color codes (30-37)
- All text background color codes (40-47)
- Customize ANSI colors:
- Go to Preferences | Editor | Colors & Fonts | Console Colors
- Expand 'ANSI Colors'
- Customize the following foreground/background colors:
- Other colors are only supported by the console (not by the editor).
- Don't forget to hit the 'Apply' button, and reopen 'ANSI Aware' files for changes to take effect.
clang-format on the statement or selection.
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
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.
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 (bundled Eclipse 4.6 (requires JRE 1.8) and 4.4 libs, also emulates Eclipse's imports optimizing, configurable external Eclipse location for Eclipse 4.5+, Workspace Mechanic support)
-C/C++ (Eclipse 4.6 (requires JRE 1.7))
-GWT (Eclipse 4.4)
Small donations are welcomed.
- 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
UroboroSQL Formatter is often used in enterprise systems, For formatting to a highly maintainable style even for very long SQL (1 K step or more) It is a plug-in of IntelliJ IDEA.
In particular, in countries where English is not their mother tongue, such as Japan, comments may be included in SELECT clauses. In that case, we will align the vertical position of the AS clause and the comment, pursuing the viewability which can be said as artistic anymore, This was developed to realize this automatically.How to use
Use Alt + Shift + L on Windows, Cmd + Ctrl + L on OS X to format currently active document.
The following options can be selected by the Preferences dialog.
- Convert reserved words and identifiers to upper case
- Using backslash escape sequences
- Comment syntax type(uroboroSQL or DOMA2)
All table rows must be delimited with '|'. Line of table must start from '|' to be formatted.
Alt+Shift+E or Right click in editor area -> Format example tables
Supported delimiters: pipe, comma, tab. When formatting, any of supported delimiters are replaced with pipe.
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.
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.
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.