Indentation and smart indent in ScintillaNET

2019-07-24 02:26发布

问题:

Can someone describe me how to make indentation work in Scintilla.net?

this.scintilla1.Indentation.SmartIndentType = ScintillaNet.SmartIndent.Simple;

I'm confused on what needs to be done to get it to work. Can someone describe what event handlers need to be implemented to get indentation to work?

回答1:

The trick is to set Indentation.IndentWidth to 8, if Indentation.TabWidth is also set to 8.

Of cource Indentation.SmartIndentType must still be set to Simple.