Editor
The JetBrains Fleet editor is the main part of the code editor that you use to create, read, and modify code.
![Editor overview f Editor overview f](https://resources.jetbrains.com/help/img/fleet/1.45/editor-overview-f.png)
The editor consists of the following areas:
Tabs – show the names of the currently opened files and help you navigate between them
Gutter – shows line numbers and provides the related functionality, such as breakpoints or buttons for running the code at a particular line
Problems widget – summarizes warnings and errors in the current file
Breadcrumbs – show the path to the current symbol and help you navigate in the path
File settings – provide configuration such as file encoding and format
When you work with code in the editor, JetBrains Fleet displays code analysis results, that include errors and warnings, on the scrollbar. You can check whether your code has issues and quickly navigate to them.
note
Some of the warnings and errors are only shown when the Smart Mode is on
The top of the scrollbar has the Problems widget that gives you a brief summary of the code problems. Click the widget to get more information on each detected problem.
The stripes on the scrollbar indicate places where JetBrains Fleet found a problem.
It is normal to see many stripes while you are working on a file. Many of these errors, warnings, and suggestions are eventually resolved as you complete the code. Should any errors remain when you feel your code is complete, we recommend that you explore and resolve them before compiling or running your project.
The different colors of stripes indicate the severity of the problems.
Click a tab, or use the following shortcuts:
Next tab: CtrlPg Dn
Previous tab: CtrlPg Up
You can choose to preview files selected in the Files tree in a separate preview tab.
Press Ctrl0, to open settings and select Editor | Appearance. Select the Enable preview option.
Alternatively, add
"editor.previewTab": true
to your settings.json.
It is sometimes convenient to work in several tabs side-by-side. To do that, drag a tab to an editor side (for vertical split) or to editor top or bottom (for horizontal split).
Press CtrlShift0K and start typing
split
. Select an action with split that you would like to perform.Alternatively, you can use shortcuts. By default, JetBrains Fleet has the following shortcuts preconfigured.
Split Right: Ctrl0\
Focus First Split: AltShift01
Focus Last Split: AltShift02
Focus Next Split: AltShift0]
Focus Previous Split: AltShift0[
To set shortcuts for other split actions, refer to Review and edit key bindings.
You can make changes to your text in several places simultaneously using additional carets. To create additional carets, do one of the following:
Press CtrlAlt0↑ or CtrlAlt0↓ to respectively add carets above or below the current one.
Hold Alt+Shift and click the places where you want to add carets
Position the caret at the repeated word or text range, then press CtrlShift0L. Carets will be added to all occurrences of the repeated word within the file.
With multiple carets, you are not limited to typing: you can copy, paste, auto-complete words, and so on.
![Multiple carets in the editor Multiple carets in the editor](https://resources.jetbrains.com/help/img/fleet/1.45/multicaret.png)
You can expand and shrink selection at caret based on text or code structure.
Use AltShift0↑ to select the outer scope (expand selection) or AltShift0↓ to select the inner scope (shrink selection).
Point at the gutter near a code block. This reveals arrows, which you can use to fold or unfold the respective code block.
You can configure how many spaces are equivalent to each tab in one of the following ways:
Press Ctrl0, to open settings and select Editor | Code. Configure the number of spaces with the Tab size setting.
Place the .editorconfig file in the folder, where you want the setting to take effect.
note
.editorconfig takes precedence over the Tab size setting.
By default, JetBrains Fleet automatically detects the indentation style in the file and uses it when inserting new lines and reformatting code. The auto-detected indent settings only apply if the required indent is not indicated in the .editorconfig file.
You can change this behavior in JetBrains Fleet settings:
Press Ctrl0, to open settings and select Editor | Code. Configure the Automatically detect indentation based on file content setting as required.
JetBrains Fleet supports vertical guides for code alignment and visual clarity.
Add the following property to settings.json:
"editor.guides": [ ]
specifying character indices for placing one or more guides.For example,
"editor.guides": [80, 120]
sets two vertical guides at indices80
and120
.
Click View | Color Theme from the main menu .
Press CtrlShift0K then type
Select color theme
.
The sticky lines (or sticky scroll) feature enhances your coding experience by maintaining the visibility of parent elements as you scroll through the file, offering immediate context to your code. In a file with a complex hierarchy of classes and methods, this feature ensures that the signature of the currently viewed method and its containing classes always remain at the top of the editor.
You can also click any of the sticky lines to scroll the editor to the corresponding declaration.
![JetBrains Fleet: Sticky lines in the editor JetBrains Fleet: Sticky lines in the editor](https://resources.jetbrains.com/help/img/fleet/1.45/fleet_enabling_sticky_lines.png)
By default, the Show sticky lines feature is enabled.
Right-click the sticky lines in the editor and click Disable sticky lines.
Press Ctrl0, to open settings and then select Editor | Appearance. Clear the Show sticky lines checkbox.
Thanks for your feedback!