Is there a way to set the tab size in IntelliJ for a single file only, or at most for a single project?
I use a tab size of 3 for all my code; however, I'm collaborating on a project with an author who prefers a tab size of 4. Is there a way to set the tab size to 4 for only those files that are part of this project?
Open the Settings dialog by navigating to File -> Settings . Under Project Settings [yourproject] on the left side of the dialog, navigate to Code Style -> General . The Tab size is configurable on that pane, and the value you provide applies only to the project named yourproject .
Switch between tabsTo move between tabs, press Alt+Right or Alt+Left . You can also switch between recently viewed tabs or files. In the editor, press Ctrl+Tab . Keep pressing Ctrl for the Switcher window to stay open.
Press Ctrl+Alt+S to open the IDE settings and select Editor | Code Style. Select the Detect and use existing file indents for editing checkbox. Apply the changes and close the dialog.
The default value for the tab-size property is 8 space characters, and it can accept any positive integer value.
Open the Settings dialog by navigating to File->Settings. Under Project Settings [yourproject] on the left side of the dialog, navigate to Code Style->General. The Tab size is configurable on that pane, and the value you provide applies only to the project named yourproject.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With