Source Insight 中的 Auto Indenting

    编码过程中,希望输入花括号时能自动对齐,Source Insigth 应如何设置?

    先来看一下Source Insight 中的帮助。

 

Auto Indenting

The auto-indenting feature controls the level of indentation as you type new text. Source Insight supports Simple and Smart types of auto-indentation. Not all languages support the Smart level.

Auto Indent Type

Specifies the type of auto-indenting. Automatic indenting occurs when you insert new lines.

None No special indenting occurs. Source Insight will return the insertion point to the very beginning of the next line when you insert a new line or word wrap.

Simple Source Insight will automatically indent text to line up with the previous or following line.

Smart Source Insight will automatically increase or decrease the indentation level when you insert new lines. Not all languages support smart indenting. If this button is selected, then the Smart Indent Options are applied.

Smart Indent Options

These check boxes determine how the smart indenting affects open and closing curly braces.

Desired Indent Style

Check box setting

if (x)

{

}

Clear both boxes.

if (x)

  {

  }

Select both boxes

if (x) {

}

Select Indent Open Brace;
Un-select Indent Close Brace

 

    依次打开“Options” –> “Document Options…” –> “Auto Indent…”,如下图

    

Auto Indenting:

  • None -- 不作任何变动
  • Simple -- 按下回车键后,光标跳到下一行的起始处
  • Smart -- 按下回车键后,根据“Smart Indent Options”的设置,自动缩进

Smart Indent Options:

    见上图,说明得很清楚了。

转载于:https://www.cnblogs.com/outs/p/6973245.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值