Disabling auto indent

SyntaxEditor for WPF Forum

Posted 14 years ago by Gustavo Guerra
Version: 10.2.0531
Avatar
How can I disable the auto block indent introduced in build 531? I already had custom indenting implemented, and the built-in block indent is conflicting with it.

Best Regards,
Gustavo Guerra

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

Block indent is now the default behavior when the language doesn't have an IIndentProvider service registered.

You can register an indent provider service with the language using the SyntaxLanguage.RegisterIndentProvider (an extension method in SyntaxLanguageExtensions) and set its mode to None to go back to the old behavior.

Alternatively, you can implement the custom smart indent logic in the IIndentProvider service now that it is the proper place to do it.

Please let us know if you have further questions.

[Modified at 10/28/2010 03:05 PM]


Actipro Software Support

Posted 14 years ago by Gustavo Guerra
Avatar
Whenever I return 4 in the GetIndentAmount method, SynatxEditor inserts a \t character, but I don't want that, I want to insert only characters. How can I control that?

Best Regards,
Gustavo Guerra
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

The document (ITextDocument) has an AutoConvertTabsToSpaces property, which is used in this case to determine whether to convert the result into tabs.

The default value is true.

Please let us know if you have further questions.


Actipro Software Support

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.