编码过程中,希望输入花括号时能自动对齐,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:

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

Source Insight 中的 Auto Indenting的更多相关文章

  1. 在source insight中集成astyle

    转自:http://www.cnblogs.com/xuxm2007/archive/2013/04/06/3002390.html 好吧,我有代码格式的强迫症,代码不整齐,我看的都头疼,之前一直喜欢 ...

  2. Source Insight 中使用 AStyle 代码格式工具

    Source Insight 中使用 AStyle 代码格式工具 彭会锋 2015-05-19 23:26:32     Source Insight是较好的代码阅读和编辑工具,不过source in ...

  3. AStyle代码格式工具在source insight中的使用

    一.AStyle下载路径 Astyle为开源项目,支持C/C++和java的代码格式化 Home Page: http://astyle.sourceforge.net/ Project Page:  ...

  4. source insight 中tab键的设置

    转:http://xinzero.com/source-insight-code-alignment-ended.html source insight代码对齐Tab键终极版 以前也写过一个sourc ...

  5. source insight中的快捷键总结

    1.快捷键 1,Shift+F8高亮显示指定字符. 2,Ctrl+F找出来的结果用F4,F3前进后退查找. 3,Alt+,后退alt+.前进查找关键字. 4,Alt+G或者F5跳转到某个固定的行号. ...

  6. Source Insight 中调用Notepad++

    options>custom commands 指令为 "E:\Program Files (x86)\Notepad++\notepad++.exe" %f 其中%f表示S ...

  7. Source insight 中 标题栏路径显示完整路径的方法

    在source insight 的标题栏中显示完整路径名的方法.Options -> Preferences -> Display -> Trim long path names w ...

  8. Source Insight中的多行注释

    转自:http://www.cnblogs.com/dongzhiquan/archive/2013/03/04/2943448.html 我们经常要对一整段代码进行注释,很多代码编辑器都提供了这样的 ...

  9. ubuntu14.04中 gedit 凝视能显示中文,而source insight中显示为乱码的解决的方法

    1.乱码显示情况: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcjc3NjgzOTYy/font/5a6L5L2T/fontsize/400/fill/ ...

随机推荐

  1. Crystal | 水晶方法的七大特征,你了解吗?

    本文摘自敏捷开发 20世纪90年代末,Alistair Cockburn提出水晶方法论. 自2001年的敏捷宣言提出以来,以极限编程为首的一系列敏捷方法逐渐走入大众视野,其中就包括水晶方法(Cryst ...

  2. mysql小白系列_08 zabbix添加自定义监控项items和触发器

    监控mysql存活 1.配置agent自定义参数 vi /usr/local/zabbix/etc/zabbix_agentd.conf Include=/usr/local/zabbix/etc/z ...

  3. php IE中文乱码

    echo mb_convert_encoding("你是我的朋友", "big5", "GB2312"); 详细出处参考:http://ww ...

  4. 云小课 | 搬迁本地数据至OBS,多种方式任你选

    摘要:搬迁本地数据至OBS,包括OBS工具方式.CDM方式.DES磁盘方式.DES Teleport方式和云专线方式,每种方式特点不同,本节课我们就一起看看有什么区别. 已有的业务数据可能保存在本地的 ...

  5. h5+ 开发分享功能

    h5+ 开发微信.QQ分享功能 此处只做微信网页分享示例代码 方式一.JS+HTML+h5Plus 1.html代码 <div class="button" onclick= ...

  6. 第7章 PCA与梯度上升法

    主成分分析法:主要作用是降维 疑似右侧比较好? 第三种降维方式: 问题:????? 方差:描述样本整体分布的疏密的指标,方差越大,样本之间越稀疏:越小,越密集 第一步: 总结: 问题:????怎样使其 ...

  7. 永久关闭windows更新步骤

    在搜索“web和windows”框中输入“服务” 在搜索结果中点击第一个,那个图标像齿轮的那个!如下图. 在打开的“服务”窗口中,我们找到windows update   找到”windows upd ...

  8. JBoss 5.x/6.x 反序列化漏洞(CVE-2017-12149)复现

    0x00 漏洞介绍 该漏洞为 Java反序列化错误类型,存在于 Jboss 的 HttpInvoker 组件中的 ReadOnlyAccessFilter 过滤器中.该过滤器在没有进行任何安全检查的情 ...

  9. 小谢第6问:js中,filter函数是怎么使用的

    数组的常用方法filter,今天在做数组筛选的时候用到需要将有重复的数组去除,因此用到这个函数,主要用到-- 选择需要的属性,最终留下想要的数组,如果刚开始的话可以看下下面代码 let nums = ...

  10. Chisel3 - Wire & Reg

    https://mp.weixin.qq.com/s/Y26N5P4XOr5e3uyi5XQY-w   不同于Verilog,Chisel中Wire和Reg并不是数据类型,而是数据容器,作为数据的一个 ...