I'm confused as to what smart tabs do in general preferences.
It says that:
Fine alignment to a necessary column is done only via spaces... If this check box is not selected, then spaces are used for alignment if necessary...
Doesn't that mean that spaces are used in alignment for both cases? Does it mean that it always uses spaces in the latter and only sometimes in the former?
Can someone illustrate with an example of the two cases?
IDEA has a “smart tabs” option that you can turn on: If this check box is selected, IntelliJ IDEA inserts tabs for indentation and reformatting, but fine alignment to a necessary column is done only via spaces. This is done in order to preserve visual representation of the source code, when the Tab Size is changed.
If you need to adjust indentation settings, in the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style. On the appropriate language page, on the Tabs and Indents tab, specify the appropriate indents options and click OK.
Switch between tabsIn the editor, press Ctrl+Tab . Keep pressing Ctrl for the Switcher window to stay open. Use Tab to switch between tabs and other files.
To toggle between tabs and spaces: On the main menu, choose Edit → Convert Indents, and then choose To Spaces or To Tabs respectively.
If smart tabs option is enabled then only spaces are used for alignment, else tabs and spaces are used.
e.g: for the following code block
function(first, second) { }
without smart tabs
t---function(first, t---t---t---.second) { t---}
with smart tabs
t---function(first, t---.........second) { t---}
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