Code Rush插件

code rush 是微软推出的一款VS2008上的插件。他有强大的文件和代码导航功能,易于访问的重构和代码创建功能、一组编辑器、选择、剪贴板工具等。

教程链接

http://www.devexpresscn.com/Resources/CodeExamples-314.html

http://www.devexpresscn.com/Resources/Documentation-316.html

 

下面的是单键模板. Most of these have narrow contexts associated with them, so the same letters can be used as variables if needed.

模板

含义 内容
. /* */ 在表示字符串的“”内,不会展开
~ 析构 在类的主体
b {
}
在表示字符串的“”内,不会展开
c 创建一个新类 必须在空行展开,可以在命名空间或类中生效
e Public event... 只会在类中展开
f false 只会在程序块中展开
f 域声明(字段) 只会在类的主体中展开
g 属性 "get" 访问器  
i 接口声明 在命名空间的主体中展开
l else 在程序块中展开
m 方法声明 类、方法、接口中展开,但不会在方法或属性中展开
n null 在程序块中展开
p 属性声明 类、方法、接口中展开,但不会在方法或属性中展开
r 智能的“return” 在程序块中展开
s 属性set访问器 仅在属性中展开
s 结构声明 仅在命名空间的主体内展开
t true 仅在程序块中展开

模板别名列表

Template

Alias
b bk
f 没有别名
f fi
l ll
n 没有别名
r rr
t 没有别名

 


在单键模板中的归类:

类型声明:

Verb

Meaning

c Declare Class
i Declare Interface
s Declare Struct



成员声明:

Member to Declare

Verb
Method m
Property p
Field f



返回值:

Verb

Meaning

r

Return value


对于返回值,可以输入:r参数 的形式来展开为return XXXX

Noun

Value

' single-quoted character
" double-quoted string
0 zero
1 one
-1 -1
f false
n null
t true
th this


比如rn,就是展开为return null;

即如下形式:

Template

Expansion

r (Smart return)
r' return '|';
r" return "|";
r0 return 0;
r1 return 1;
r-1 return -1;
rf return false;
rn return null;
rt return true;
rth return this;



表达式:
当在一个变量后,输入“=”后,继续输入下面的字母有如下效果:

Noun

Value

f false
n null
t true
th this
va value


即:当输入 bool  isok = f 后,再按空格,会自动展开为 bool  isok = false


Template

Expansion

=f =  false;
=n =  null;
=t =  true;
=th =  this;
=va =  value;


在“=”左边,有如下效果:

Noun

Property

c Checked
e Enabled
tx Text
v Visible




Noun

Property

ht Height
lt Left
tp Top
wd Width


完全简写的形式,可以用于表达整个式子:

Template

Expansion

c=c CheckState = CheckState.Checked;
c=f Checked = false;
c=i CheckState = CheckState.Indeterminate;
c=t Checked = true;
c=u CheckState = CheckState.Unchecked;
ca=f Capture = false;
ca=t Capture = true;
e=f Enabled = false;
e=t Enabled = true;
v=f Visible = false;
v=t Visible = true;
posted @ 2015-03-30 17:20  盛开的雨季  阅读(438)  评论(0编辑  收藏  举报