friendly wrote:Is there someway I can change the default indent value?
Can I also assign a keystroke to add/remove indents?
I'm used to other editors where I can indent/unindent blocks of selected code with just a keystroke or two.
Both questions can be answered with YES.
If a block is selected (= at least 1 entire line with the line ending character(s)) pressing key TAB adds an indent and SHIFT+TAB removes one indent.
The commands Add Indents
and Remove Indents
in menu Format
are only needed for adding or removing multiple indents at once and often pressing multiple times TAB or SHIFT+TAB is faster for changing the indents of a selected block. The name of these 2 commands in the key mapping configuration dialogs are FormatAddIndents
when you want to assign your own hotkeys. But I suggest to simply use TAB and SHIFT+TAB.
What an indent is can be configured at Advanced - Configuration - Editor - Word Wrap / Tab Settings
. It can be a tab or a space and the tab stop value respectively the indent spaces value define the width of the indent. Different tab stop values are also possible. All settings you see below the drop down list containing by default only the entry Default
are only for the files with the extension displayed in the drop down list. Default
means for all files with an extension not defined different by you. See my first post above for a detailed step by step introduction how to setup file extension based word wrap and tab settings and don't forget to press the button Help
in this configuration dialog to get additional help when you need it.