编码过程中,希望输入花括号时能自动对齐,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. ShoneSharp语言(S#)软件更新13.7版

    ShoneSharp语言(S#)编辑解析运行器 软件更新13.7版 作者:Shone 近期在写博客过程中对S#进行增强,把语法规则更新到2.0版,并同步更新软件到ShoneSharp.13.7.exe ...

  2. Redis学习笔记(十五)Sentinel(哨兵)(中)

    上一篇 我们模拟了单机器下哨兵模式的搭建,那么接下来我们看下哨兵模式的实现与工作. 为什么又分成两篇呢?因为篇幅太长(偷懒),再一个这篇主要说的是Sentinel的初始化以及信息交换,下一篇着重说下状 ...

  3. DOM变化后事件绑定失效

    第一个file在change时,是能够触发事件的,而第二插入的file则没有change事件.对于这个问题,有如下两种解决方法: 第一种是将绑定change事件封装成一个函数,在点击button按钮插 ...

  4. Docker入门 安装Tomcat以及报404解决方案

    时间:2020/1/18 17:34:09 浏览:24 来源:互联网 记录简单的在Docker 上安装Tomcat 首先我是在云服务器上(Centos系统)安装的Docker,我们需要在https:/ ...

  5. html浏览器高度和宽度和其他dom获取

    1.获取网页可见区域的宽度:document.body.clientWidth ; 2.获取网页可见区域的高度:document.body.clientHeight; 3.获取 网页可见区域宽:doc ...

  6. 0507 构造代码块和static案例,接口interface

    0507构造代码块和static案例,接口interface [重点] 1.局部变量,成员变量,静态变量的特点 2.接口 接口语法:interface A {} 接口内的成员变量[缺省属性]publi ...

  7. 01.Django-基础

    基础 1. 简介 Django是一个由Python写成的开放源代码的重量级Web应用框架. Django的目的是使常见的Web开发任务,快速和容易 2. 特点 MVC开发模式 内置进行快速web开发所 ...

  8. 盘点Mysql的登陆方式

    前置知识 我们想登陆到mysql中前提是肯定需要一个用户名和密码:比如 root root 在mysql中用户的信息会存放在 mysql数据库下的 user表中 可以 use mysql 然后sele ...

  9. 插入与读取Blob类型数据

    BlobTest package com.aff.PreparedStatement; import java.io.File; import java.io.FileInputStream; imp ...

  10. Rocket - debug - TLDebugModuleInner - Abstract Command State Machine

    https://mp.weixin.qq.com/s/RcXI8uEHvZHGCvX3DoVR4Q 简单介绍TLDebugModuleInner中处理抽象命令时的状态机. 1. CtrlState 定 ...