前言

Source insight是一款非常优秀的代码阅读软件,但是有些地方还是不够完善,比如没有快速对一段代码进行注释的功能。对于此类需求,我们可以借助宏来实现。网上有很多source insight的宏,这里只介绍我觉得比较好用的几个。

MultiLineComment.em:实现多行注释的宏代码

AddMacroComment.em:实现添加“#if 0”和“#endif”的宏代码

quicker.em: 该宏功能扩展文件是华为某员工进行整理和开发的,功能十分强大

一、安装source insight宏

1、将宏文件放入工程代码所在的文件夹

2、将宏文件添加到工程中

二、设置宏快捷键

1、Options->Key Assignments,找到Macro: MultiLineComment,添加快捷键即可,推荐使用**Ctrl+/**组合键。

2、Options->Key Assignments,找到Macro: AddMacroComment,添加快捷键即可,推荐使用Ctrl+3组合键(数字3对应#号,方便记忆)。

3、Options->Key Assignments,找到Marco:AutoExpand,添加快捷键即可,推荐使用Ctrl+Enter组合键。(这里用到了quicker.em)

三、测试快捷键

1、Ctrl + / 多行注释

2、Ctrl + 3 添加“#if 0”和“#endif”

四、quicker.em使用介绍

使用方法

在文件空白处输入 quicker.em 支持的命令,按下 Ctrl+Enter 即可

支持命令

/*==============================================**====== List Quicker supports commands ========**----------------------------------------------***  /*             auto fill comment according to standard C format*  //             auto fill comment according to standard C format*  {              auto add right curly bace**  name           auto record author's name*  if             auto insert if condition statements template*  ef             auto insert else if condition statements template*  ife            auto insert if/else condition statements template*  ifs            auto insert if/else if/else condition statements template*  else/ei        auto insert else statements template**  switch/sw      auto insert switch/case statements template*  case/ca        auto insert case/break statements template**  for            auto insert for loop statements template*  fo             auto insert for loop statements template*  while/wh       auto insert while loop statements template*  do             auto insert do/while loop statements template**  func/fu        auto insert function header description template*  file/fi        auto insert file header description template*  hi             auto insert new history record in history comment*  struct/st      auto insert typedef struct statements template*  enum/en        auto insert typedef enum statements template**  ap             auto insert problem number and description comment**  pn             set problem number used by below command**  ab             auto insert add begin description for assigned PN comment*  ae             auto insert add end description for assigned PN comment*  db             auto insert delete begin description for assigned PN comment*  de             auto insert delete end description for assigned PN comment*  mb             auto insert modify begin description for assigned PN comment*  me             auto insert modify end description for assigned PN comment*  abg            auto insert add begin and end description for assigned PN comment*  mbg            auto insert modify begin and end description for assigned PN comment*  dbg            auto insert delete begin and end description for assigned PN comment**  hd             auto create .h header file for current .c file*  hdn            auto create new .h header file for current .c file**  key            list Source Insight default shortcut keys*  cmd/help       list Quicker supports commands just this showed**  #if            auto insert #if statements template*  #ifd/#ifdef    auto insert #ifdef statements template*  #ifn/#ifndef   auto insert #inndef statements template**  cpp            auto insert extern C statements template*  tab            auto expand tab to assigned spaces**----------------------------------------------**======= End Quicker supports commands ========**==============================================*/

使用演示

1、输入help ,按Ctrl+Enter查看所支持的命令

2、输入fi ,按Ctrl+Enter创建文件说明

以上宏文件及更多宏文件获取渠道:https://wwu.lanzoul.com/iYCqE0amkdde

Source Insight利用宏文件实现多行快速注释以及其他超级好用的功能相关推荐

  1. 利用宏文件提取SolidWorks草图中点的坐标

    软件平台:SolidWorks2016+Excel2013 1. 在SolidWorks中建立好草图点,然后选择工具->宏->新建 2. 将Macrol 1中代码删除,复制如下代码放进去, ...

  2. Source Insight 4.0 快捷键设置多行注释与反注释

    步骤一:Options--->Key Assignments,如下图 步骤二:在Command:中输入Edit:comment,会过滤后出现Edit:Comment Lines和Edit:Un- ...

  3. Source Insight Source Navigator使用技巧

    Source Insight & Source Navigator使用技巧 一.Source Insight实用技巧: Source Insight(下文的SI指的也是它)就是这样的一个东西: ...

  4. Source Insight使用技巧

    一.Source Insight实用技巧: Source Insight(下文的SI指的也是它)就是这样的一个东西: Windows下开发人员的至爱,功能强大,界面友好.支持语法高亮.符号跳转,还支持 ...

  5. Source Insight 4.0使用介绍

    简介 Source Insight是一个功能非常强大的,面向项目的程序编辑器,具有针对C/C ++,C#,Java,Objective-C等的内置动态分析.Source Insight可实现多文件代码 ...

  6. source insight 破解版

    下载:http://www.sourceinsight.com/down35.html 注册码: SI3US-205035-36448 1.下载"Source Insight "安 ...

  7. Source Insight 使用详细过程

    1 创建新项目 打开Source Insight,选择"Project"->"New Project". 2  设置项目名称和工作路径 3 选择源码 选择 ...

  8. 【Android】Source Insight 基本用法 ( 导入 Android 源码 | 设置字体 | 显示行号 | 搜索功能 | 快捷键设置 )

    文章目录 一.导入 Android 源码 二.配置字体 三.显示行号 四.Tab 键字符个数 五.搜索功能 六.打开文件列表 七.快捷键设置 在 [Android 系统开发]使用 Source InS ...

  9. Source Insight提示行尾不一致

    在使用Source Insight时,时常收到弹窗提示 一个两个文件还好,文件多了很影响体验 xx\xx\filename has line endings that are not consiste ...

最新文章

  1. 数据结构之直接插入排序
  2. avcodec_receive_packet 11
  3. 浅析x86架构中cache的组织结构
  4. 程序员微信头像_这才是程序员的内心独白
  5. 活动 | Daung~!他们用产品思维改变医疗挂号问题
  6. 关于ORACLE 10g中“ORA-12541:TNS:no listener”的问题解决方案
  7. SAP Spartacus里的injector
  8. 跟我学: 使用 fireasy 搭建 asp.net core 项目系列之一 —— 开篇
  9. 魔术命令python_Python前10个魔术命令可以帮助您提高生产率
  10. 转载 Spark性能优化指南——基础篇
  11. zClock - 置顶时钟, 倒计时, 网速显示
  12. 嵌入式 linux usb转串口,Linux下,USB转串口问题
  13. 数据结构-二叉树、搜索树、平衡二叉树详解及C语言实现
  14. Android 判断用户2G/3G/4G移动数据网络
  15. 凸优化第九章无约束优化 9.2下降方法
  16. drools规则引擎使用文档
  17. 微信域名防封的解决方案
  18. Java高并发编程中Phaser的使用及详细介绍-刘宇
  19. 公司会议如何保证高效
  20. linux 路径 别名,如何创建路径别名

热门文章

  1. Arduino笔记-数码管的基本使用
  2. tp5怎么引用.css.php,tp5分页css tp5怎么引入css,js文件
  3. 卡通3d 虚拟形象制作产业应用
  4. OpenGL - Bloom
  5. MySQL_基础+高级篇- 数据库 -sql -mysql教程_mysql视频_mysql入门_尚硅谷2
  6. C++学xuexi (6)转换函数
  7. android 系统 锁屏界面,在安卓手机系统使用Ubuntu漂亮的锁屏界面攻略
  8. 中关村颠覆性技术创新项目资助政策及申报条件重点介绍,补贴500万
  9. 怎么一次性将Excel表格中指定文本整行数据删除
  10. 南京理工大学计算机学院教授严捍,南京理工大学计算机科学与技术学院研究生导师简介-唐金辉...