编码过程中,希望输入花括号时能自动对齐,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. 利用logrotate将mysql log截断

    https://blog.pythian.com/mysql-log-rotation/ 1.授权用户 CREATE USER 'log_rotate'@'localhost' IDENTIFIED ...

  2. PAT-1078 Hashing (散列表 二次探测法)

    1078. Hashing The task of this problem is simple: insert a sequence of distinct positive integers in ...

  3. ssserver多出口ip

    环境:centos6.10-7x(虚拟机),配置好之后至少保证能上网 需求:在一台服务器上配置多ip,并实现,用哪个ip 作为代理,访问ip138.com这类的网站的时候就返回对应的ip. 实现步骤: ...

  4. SQL SERVER修改为sa登陆权限报错,233,18456接连出现【抓狂ing】

    [记录生活] 今天做作业需要修改sa权限,本人电脑没错误. 同样教程发给朋友,错误百出.... 话不多说,百度很多解决方法,但是都没有解决,贴出解决方法. 0.用Windows身份验证登录,执行SQL ...

  5. 微信小程序初探--写个扫雷分享给你玩

    闲暇里,想学一下微信小程序, 于是,用微信小程序原生做了个扫雷玩. 以下略作总结,分享给大家. 微信里下拉,输入[mini计算器], 看到这个图标的就是了: 说好的扫雷,怎么变成计算器了?原因后面解释 ...

  6. [COCOS2DX-LUA]0-002.在C++中如何接收Lua方法,然后tolua

    用过COCOS2DX-LUA的同学们,大家都知道回调函数这个东西,在Lua中,我们可以把一个方法当成是一个参数传递给另一个方法,然后在方法中进行调用.但是我们经常要写C++代码,然后再转成Lua,那么 ...

  7. 数据库原理实验指导(三)使用SQL语言进行简单查询【转载csdn】

    --1.查询全体学生的学号和姓名select sno,sname from student --2.查询全体学生的详细记录select * from student --3.查询软件学院的学生姓名,年 ...

  8. Java动态代理与静态代理以及它能为我们做什么

    相信我们在网上和平时学习和工作中或多或少都接触过Java的代理模式,经常听到什么静态代理.动态代理的一些名词.但我们是否真的很清楚这些呢?至少我在面试时,发现很多人并不很清楚. 首先代理比较好理解,就 ...

  9. Bootstrap解决页面缩小变形的办法

    bootstrap布局是应用得很广泛的一种网页布局方法,例如:我们用一种中间内容很流行的布局分布:3-6-3式布局.代码如下 <style type="text/css"&g ...

  10. 【Linux】CentOS7安装tomcat8.5.45,这方法也太简单了吧!

    1.下载tomcat https://tomcat.apache.org/download-80.cgi 选择tar.gz.下载完大概9495kb大小的压缩包 2.将文件从Windows复制到Cent ...