三星S8不能开启三星note8 王者荣耀耀的王者时刻功能

source insight中怎么给不同的关键字定义不同的颜色? - 知乎3被浏览739分享邀请回答0添加评论分享收藏感谢收起与世界分享知识、经验和见解7614人阅读
linux(26)
4、SI中的自动对齐设置:
&&& 在C程序里, 如果遇到行末没有分号的语句,如IF, WHILE, SWITCH等, 写到该行末按回车,则新行自动相对上一行缩进两列。
&&& Option-&Document option下的Auto Indient中Auto Indient Type有三种类型 None,Simple,Smart。个人推荐选用Simple类型。
7、恢复ctrl+a的全选功能
&&& 通过关键词save 找到save all,更改为ctrl+shift+a,通过关键词select找到select all,更改为ctrl +a
8:在Source Insight中添加自定义功能的步骤如下:
1.Source Insight中,Options-&Custom Commands...-&Add...,New Command name 随便写,我的是&Edit with Vim&
2.Run中写入: &C:\Program Files\Vim\vim63\gvim.exe& --remote-silent +%l %f
意思是在当前已经打开的gvim窗口里面打开当前的文件,并且跳转到指定行
%l为当前的行号,%f为文件名
使用 --remote-silent 的作用是,如果已经打开了对应文件,就不会打开第二次,而是在已经打开的文件里跳转到对应行
3.还是同一个对话框里面,选择Keys-&Assign New Key...-&按F12,如果你已经将F12设置给其他命令,选择其他的按键就行了
下面是一些常用自定义功能:( CUSTOM COMMANDS )
以下几个自定义命令我把他们关联到了菜单。
自定义的菜单名
Run编辑框内容
Explore File
打开资源管理器并选中当前文件
ShellExecute open explorer /e,/select,%f
Edit with UE
在ultriEdit中编辑
&C:\Program Files\UltraEdit-32/uedit32& %f
Edit with VIM
在vim中编辑并定位到当前行
&C:\Program Files\Vim\vim63\gvim.exe& --remote-silent +%l %f
格式化当前文件(后面章节会介绍)
&C:\AStyle\bin\AStyle.exe& --options=&C:\AStyle\bin\c.opt& %f
Trim Whitespace
删除整个文件每行行末尾的空白字符
这个是从Edit: Trim Whitespace从加进来的,是SI自带的功能,只是没有放到菜单上来而已。
关于这些%f、%l等参数什么意思,这是SI的通配符,可以搜索下SI帮助文档“Command Line Substitutions”章节,里
&C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe& /command:log /path:%f /notempfile /closeonend
&C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe& /command:diff /path:%f /notempfile /closeonend
取得锁定(check out)
&C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe& /command:lock /path:%f /notempfile /closeonend
提交(check in)
&C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe& /command:commit /path:%f /notempfile /closeonend
提交所有(check in)
&C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe& /command:commit /path:*.* /notempfile /closeonend
更新(update)
&C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe& /command:update /path:%f /notempfile /closeonend
更新整个目录(update all)
&C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe& /command:update /path:*.* /notempfile /closeonend
取消锁定(undo check out)
&C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe& /command:revert /path:%f /notempfile /closeonend
在ultriEdit中编辑
&C:\Program Files\UltraEdit-32/uedit32& %f
在vim中编辑并定位到当前行
&C:\Program Files\Vim\vim63\gvim.exe& --remote-silent +%l %f
汇总其他小技巧:
让{ 和 } 不缩进:
Options-&Document Options-&Auto Indent-&Indent Open Brace/Indent Close Brace
hao space: SourceInsight 小技巧
1、按住&ctrl&, 再用鼠标指向某个变量,点击一下,就能进入这个变量的定义。
2、今天把一个用sourceinsight排版整齐的C文件,偶然用VC打开一看,全乱了。研究了半天,发现SI对每个字符的宽度不太一致。
&&& 请教同事发现选上&view --& draft view&, 就可以让每个字符的宽度一致了。快捷键是 &Alt + F12
Source Insight是阅读和编写代码的好东东,基本上也算得上是经典之作了,虽然还有一点点小bug,不过对于我们这些C程序员来说可是一旦拥有别无所求。下列小技巧是在工作中同事整理总结的,对提高工作效率多少有点帮助,其中有些是对应于SVN的,没有使用SVN做版本管理的人就不要白费力气了。
ShellExecute open explorer /e,/select,%f
X:\Progra~1\TortoiseSVN\bin\TortoiseProc.exe /command:log /path:% /notempfile /closeonend
&X:\Progra~1\TortoiseSVN\bin\TortoiseProc.exe /command:diff /path:% /notempfile /closeonend
怎么添加makefile文件
Options -& Document Options... Alt-T&&& -& 点击Document Type的下拉框,然后选择Make File,在右边的File Filter中,在原先的*.mak后面加上一个分号,即多个不同过滤
规则以分号间隔开,再加上*makefile,变成 *.*makefile,并且选中Include when adding to projects,这样,以后再新建工程的时候,就可以识别makefile或Makefile了(
好像此处Source Insight并不区分大小写)。
&Source Insight常用的快捷键:
&&& Ctrl+= :Jump to definition
&&& Ctrl+/ :Look up reference
&&& F3 : search backward
&&& F4 : search forward
&&& F5: go to Line
&&& F7 :Look up symbols
&&& F8 :Look up local symbols
&&& F9 :Ident left
&&& F10 :Ident right
&&& Alt+, :Jump backword
&&& Alt+. : Jump forward
&&& Shift+F3 : search the word under cusor backward
&&& Shift+F4 : search the word under cusor forward
&&& F12 : incremental search
&&& Shift+Ctrl+f: search in project
&&& shift+F8 : hilight word
source insight是一个出色的程序编辑器和代码浏览器,利用好它会给编写和阅读源代码带来极大的方便。想要配置好source insight可不是一件轻松的事,我比较喜欢深色背景有利于保护眼睛,但同时也必须更改代码颜色来匹配背景色,source insight的很多窗口、选项都可以指定字体、颜色,实在让人犯晕!最麻烦的是源码窗口的配置了,这里简单提一下,source insight的最终配色是由Style Properties决定的(右键菜单--&Style Properties)
左边一栏是风格名,选中的是当前光标下的风格名,这些风格之间是有继承关系的,可以看到有很多=号,这代表继承了父风格(Parent Style),pick则是让你单独设置,最右边还可以导入、导出、添加风格等。所有风格最终由Default Text继承而来的,Font Name是灰的,它由Document Options(Alt+T)中的当前文档类型 Screen Fonts决定的(所以不同的文件类型,如C,Python,Java它们的字体可以不同的)。Background是由Options--&Preferences--&Colors中的Window
Background决定的,其实Default Text的背景就是源码窗口的背景。Foreground也一样,pick了它等于设置了Options--&Preferences--&Colors中的Default Text。我也晕了,汗……
正是这些风格让source insight五彩缤纷:
还要提一句,sourceinsight中还有一个Draft View(Alt+F12),在这个模式中会忽略Style Properties中字体部分设置,统一改用Draft View(见左边栏)中设置的字体。我制作了一个背景为深黑色,字体为Fixdays的配置文件(包含其它设置)让大家下载:
罗嗦了半天,WRK还没说呢,关于如何使用请看 。source insight分析完WRK后大家肯定会发现连IRP、DEVICE_OBJECT这样的结构都没法解析,其实罪魁祸首就是那些函数宏,比如_IRP前面的DECLSPEC_ALIGN(),如果用我前面的配置文件调过颜色的话一眼就可以看出,source
insight把它当成了Declare Function了,这些宏大多起修饰作用并无实质影响,但一样的宏在MS的代码中数不胜数(如非vc6的crt,头文件,连printf都解析不来)。可以看看这个帖子
,我一开始以为是BUG,但source insight提供了解决方案,那就是Token Macro。Token Macro就是source insight的预处理器,它可以像C预处理器那样展开宏,正是为了对抗那些混淆source insight的宏而设计的。Token Macro是一个以.tom结尾的文件,对C/C++来说是C.tom,只要把它放在source insight创建工程的目录下,就可以立马起作用(不用重新parse一遍,不过有些时候还是parse一遍好),它会跟程序目录下的全局C.tom结合去展开宏。Token
Macro编写非常简单,跟#define语法差不多(但没它强大)。大家看看我针对WRK做的C.tom就明白了,由于大多数函数宏只起修饰作用不会影响代码的解析,所以我把大多数宏做成了空宏。
A token macro file consists of token macros, one per line. The format of a token macro is:
macroname &no text here means macro is a no-op&
macroname substituted text here
macroname(parameter list) substituted text with
parameter names
macroname(parameter) text##parameter // concatenates
; comments begin with a semicolon
Some examples of token macros:
MyStructure(sname) struct sname
NoOperation
BuildName(name1, name2) name1##name2
另外条件编译也是一个可能让source insight分析出错的地方,默认它会分析所有的条件分支。但碰到这样的情形就糟糕了:
void&MyFunc&&#ifdef&XYZ&&&&&&(int&param1,&int&param2)&&#else
&&&&&&(long&param1,&long&param2)&&#endif
&&{&&&&&&…&&}&&void&DoThing(&&&&&&int&param1,&&#ifdef&ABC&&&&&&int&param2)&&#else
&&&&&&int&param2,&param3)&&#endif&&
void MyFunc
#ifdef XYZ
(int param1, int param2)
(long param1, long param2)
void DoThing(
int param1,
#ifdef ABC
int param2)
int param2, param3)
很不幸,WRK中也有这样的问题,这个可以通过添加Condition的方法解决。
我在Global Conditons中添加了;
MIDL_PASS&&& 0__midl&&& 0
Project-Specific conditions添加了:
_AMD64_&&& 0_MSC_VER&&& 1300_NDIS_&&& 1 _NTDDK_&&& 1 _NTIFS_&&& 1 _WIN64&&& 0 _X86_&&& 1
这样不符合条件的分支代码会不进行解析,用灰色表示。
另外,sourceinsight还有一个小BUG,用typedef定义函数指针类型时,当函数指针返回类型(也用typedef定义)和函数指针类型定义在同一行时,函数指针返回类型无法解析。如:
typedef&&&NTSTATUS&(*WMIENTRY)(&&……);&&typedef&NTSTATUS&&(*WMIENTRY)(&&……);&&
NTSTATUS (*WMIENTRY)(
……);//NTSTATUS无法解析
typedef NTSTATUS
(*WMIENTRY)(
……);//NTSTATUS可以解析
还有typedef定义函数指针类型时,函数的参数也都是不染色!这个问题似乎没有什么解决方法,用Custom Parsing也无济于事。
还有一种情况会让source insight解析出错,比如IopfCompleteRequest、NtQueryEaFile函数,在函数名和{之间有一段多行宏,这样source insight就解析的有问题了。这应该是个BUG,不知道大家有什么解决办法,我迫不得已只好挪动一下宏的位置!
现在几乎所有的问题都解决了,代码中都染上颜色了吧,呵呵……
The token macros are listed in a file with a .tom extension. The globaltoken macro file resides in the Source Insight program
directory. The project-specifictoken macro file, if any, is stored in project’s data directory. The projecttoken macro file is combined
with the global file, with the projectmacros taking precedence.
A token macro file consists oftoken macros, one per line. The format of atoken
macroname &no text here means macro is a no-op&
macroname substituted text here
macroname(parameter list) substituted text with
parameter names
macroname(parameter) text##parameter // concatenates
; comments begin with a semicolon
Some examples of
token macros:
MyStructure(sname) struct sname
NoOperation
BuildName(name1, name2) name1##name2
Each built-in language parser has a corresponding
token macro file. The name of the
token macro file for each language is summarized below:
Table 4.2:
Token Macro Files for Different Languages
C and C++
C.tom – a default copy ships with Source Insight.
Resource Files
x86 Assembly Language
If you want to change the
token macros, simply open the
token macro file, make your changes, and save the file. Source Insight will recognize that thetoken macros have changed for the appropriate language. Open files are automatically re-parsed.
When you edit a
token macro file, you must save it to disk before Source Insight will re-parse your open files. However, Source Insight will not automatically re-parse your whole project. You should make all your changes to thetoken
macro file first, then use the Rebuild Project command to re-parse your whole project. Until your project is re-parsed, the symbol information stored in Source Insight’s symbol database will not reflect the changes you made to yourtoken
Each project can have its own set of
token macro files. Source Insight does not create them automatically, but you can yourself. A projecttoken macro file is saved in the project's data directory. When Source Insight parses a
source file, it combines the projecttoken macros with the global set saved in the Source Insight program directory. The projecttoken macros
take precedence over the global ones. By adding project specifictoken macros, you can tailor thetoken macro expansion for each project
individually.
static __attribute__((unused)) char dev_name[CONFIG_SYS_MAX_NAND_DEVICE][8];
static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
&&&&& ulong base_addr)
加载了C.tom后就可以显示下面的函数了,
C.tom内容如下
__attribute__(unused)
__initdata
__initdata
__initconst
__exitdata
__exit_call
__refconst
__init_refok
__initdata_refok
__exit_refok
__exitused
__exitused
__devinitdata
__devinitconst
__devexitdata
__devexitconst
__cpuinitdata
__cpuinitconst
__cpuexitdata
__cpuexitconst
__meminitdata
__meminitconst
__memexitdata
__memexitconst
__INITDATA
__INITRODATA
__FINITDATA
__DEVINITDATA
__DEVINITRODATA
__CPUINITDATA
__CPUINITRODATA
__MEMINITDATA
__MEMINITRODATA
__REFCONST
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:118937次
积分:2426
积分:2426
排名:第14736名
原创:123篇
转载:19篇
评论:13条
(1)(1)(1)(3)(7)(9)(13)(4)(5)(7)(4)(5)(6)(7)(1)(5)(9)(3)(1)(3)(2)(4)(1)(9)(5)(8)(11)(4)(3)}

我要回帖

更多关于 三星s8玩王者荣耀卡吗 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信