随笔 - 64, 文章 - 11, 评论 - 12, 引用 - 0
数据加载中……

va宏及环境变量的记录


1Date
 2 $DATE$ Year/month/day formatted as %04d/%02d/%02d
 3 $DAY$ Day of month formatted as %d
 4 $DAY_02$ Day of month formatted as %02d
 5 $DAYNAME$ Three-character abbreviation of day
 6 $DAYLONGNAME$ Full name of day
 7 $MONTH$ Month formatted as %d
 8 $MONTH_02$ Month formatted as %02d
 9 $MONTHNAME$ Three-character abbreviation of month
10 $MONTHLONGNAME$ Full name of month
11 $YEAR$ Year formatted as %d
12 $YEAR_02$ Year formatted as %02d
13Time $HOUR$ Hour formatted as %d
14 $HOUR_02$ Hour formatted as %02d
15 $MINUTE$ Minute formatted as %02d
16 $SECOND$ Second formatted as %02d


17File
18 $FILE$ Full filename with path*
19 $FILE_UPPER$ Full filename with path in uppercase*
20 $FILE_BASE$ Filename without path or extension*
21 $FILE_BASE_UPPER$ Filename without path or extension in upper case*
22 $FILE_EXT$ Filename extension*
23 $FILE_EXT_UPPER$ Filename extension in upper case*
24 $FILE_PATH$ Path of file*
25 $FILE_PATH_UPPER$ Path of file in upper case*


26General
27 $clipboard$ Current clipboard
28 $end$ Position of caret after expansion
29 $selected$ Current selection**
30 $$ Literal '$' character


31Symbol Context
32 $MethodName$ Name of containing method
33 $MethodArgs$ Method parameters
34 $ClassName$ Name of containing class
35 $BaseClassName$ Name of base class of containing class
36 $NamespaceName$ Name of innermost containing namespace


37GUID
38 $GUID_DEFINITION$ Generated GUID formatted for use in a definition
39 $GUID_STRING$ Generated GUID formatted for use in a string
40 $GUID_STRUCT$ Generated GUID formatted for use in a struct


41 Refactor
42 $GeneratedPropertyName$ Property name generated during Encapsulate Field
43 $MethodArg$ One parameter of the method and its type
44 $MethodArgName$ One parameter of the method
45 $MethodArgType$ Type of one parameter of the method
46 $MethodBody$ Body of implementation
47 $MethodQualifier$ Optional qualifiers of method
48 $ParameterList$ Parameters separated by commas
49 $SymbolContext$ Context and name of method
50 $SymbolName$ Name of method
51 $SymbolPrivileges$ Access of method
52 $SymbolStatic$ Keyword static or blank
53 $SymbolType$ Return type of method
54 $SymbolVirtual$ Keyword virtual or blank

另外,参考官方网站http://www.wholetomato.com/products/features/vasnippets.asp学习更多。。
最后的最后是系统环境常用的变量(也许有用):

WINDOWS系统变量
ALLUSERSPROFILE=H:\Documents and Settings\All Users        //所有用户的PROFILE路径
APPDATA=H:\Documents and Settings\Administrator\Application Data        //当前用户的应用程序路径
ClusterLog=H:\WINDOWS\Cluster\cluster.log        //集群日志路径
CommonProgramFiles=H:\Program Files\Common Files        //应用程序公用的文件路径
COMPUTERNAME=E2003        //计算机名称
ComSpec=H:\WINDOWS\system32\cmd.exe        //当前的命令解释器
HOMEDRIVE=H:         //当前用户的主盘
HOMEPATH=\Documents and Settings\Administrator        //当前用户的主目录
LOGONSERVER=\E2003        //登录的服务器
NUMBER_O_PROCESSORS=1        //当前计算机的处理器数字
OS=Windows_NT        //当前系统的内核
Path=H:\Program Files\Support Tools\;H:\WINDOWS\system32;        //学过DOS的都知道
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH        //以前DOS下默认的是COM,EXE,BAT,现在已经有这么多了哟,以前都不知道,脚本都可以不打扩展名了
PROCESSOR_ARCHITECTURE=x86        //处理器架构
PROCESSOR_IDENTIFIER=x86 Family 15 Model 1 Stepping 3, GenuineIntel        //处理器标识符
PROCESSOR_LEVEL=15        //没注意过,不知道有什么用
PROCESSOR_REVISION=0103        //版本?
ProgramFiles=H:\Program Files        //应用程序的默认安装目录
PROMPT=$P$G        //学过DOS的都知道
SESSIONNAME=Console        //会话名称?
SystemDrive=H:    //系统所在的盘符
SystemRoot=H:\WINDOWS        //系统所在的目录
TEMP=H:\DOCUME~1\ADMINI~1\LOCALS~1\Temp         //当前用户的临时目录
TMP=H:\DOCUME~1\ADMINI~1\LOCALS~1\Temp          //同上
USERDNSDOMAIN=MCSE.COM        //当前用户所在的域的DNS表示
USERDOMAIN=MCSE        //NETBIOS表示
USERNAME=administrator        //当前用户名
USERPROFILE=H:\Documents and Settings\Administrator        //当前用户的配置文件目录
windir=H:\WINDOWS        //windows所在的目录,总是跟systemroot一样 


posted on 2011-04-13 11:22 Robertxiao 阅读(130) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理