到目前位置( 0.5.5.090524 )大概还不支持druntime的版本(2.020及以后)。09.05.27
新增:Shortcuts (9/25)
新增:格式化配置:(9/8 更新)
Eclipse 3.4我用的是sdk那个包。另一个小点的包中文没有装上。
Eclipse 中文安装地址:
http://download.eclipse.org/technology/babel/update-site/ganymede
Descent下载地址:
http://downloads.dsource.org/projects/descent/
现在最新的是0902
第一次安装Descent:将包中东西复制到 Eclipse 对应目录下就可。
启动 Eclipse,在菜单 文件---新建----其他下就能看到下图说明安装成功。
图1:
配置:
安装dmd:菜单----窗口----首先项:然后按图示操作:
编译器系统类库中,第一项 phobos 是自动生成的,其它的自己添加。
图2
上图确认退出后见下图:(记得勾上)
图3:
配置dmd:(见下图)
图4:
配置debug:
配置拼写检查:
配置注释:
把文本选项去掉,不然会乱报错,注释里全是红色下划线。
至此配置就基本完成了,编译配置后面再说。
新建项目、新建文件都很简单,只要输入文件名就可,就不细说了。
建好之后就可以开始体验编辑功能了,简要贴几幅图,更细的功能自己慢慢体会:
输入mo然后按alt + / 键,出现下图:(哪些有黄色的提示框出现还没找到规律)
输入df 然后按alt + / 键,就有了我们要导入的东西:
main函数的输入:
编译配置:
用dfl.exe 编译:
从下图开始:
点程序---右键---新建:
前后两项需要手工输入,中间一项从变量中选择,每项之间有一个空格。
勾选这一项就能看到下图的内容
文件编辑好后,点击 dfl编译,会多出三个文件,执行exe文件就看到了你要的结果。
以上在自己机器上试验成功(dmd2.018 + dflsvn 2.017),更多的以后再更新。(图太多了,写起来很费劲)
格式化配置:(9/8 更新)
语法配色
外观颜色
外观结构
代码模板生成 (选 format-----edit,可编辑 代码模板格式(括号、结构)图 )
代码模板格式
代码模板格式(括号、结构)
代码模板格式(括号、结构-2)
编码及中文配置
如此设置之后,含有中文字符就能正常编译了。
Shortcuts ¶
* Ctrl + Shift + F: format source file.
* Ctrl + I: correct indentation.
* Ctrl + O: quick outline.
* Ctrl + E: shows list of open editors.
* Ctrl + Shift + T: open type.
* Ctrl + Shift + R: open resource.
* Ctrl + /: comment lines.
* Ctrl + Shift + /: comment block
* Ctrl + Shift + \: remove block comment
* Ctrl + space: autocomplete.
* Ctrl + 2, R: rename localy.
* F3: go to definition.
* Alt + Left/Right: next/previous position in editor.
* Ctrl + Q: go to last edit location
* Ctrl + Shift + P: go to matching bracket
* Ctrl + L: go to line
* Crtl + Shift + Up: go to previous member
* Ctrl + Shift + Down: go to next member
* F2: show tooltip description
Hovers ¶
* Hover on element: shows it's ddoc, or, if missing, tries to evaluate.
* Hover on element while holding shift: shows the source code of the element.
* Hover on element while holding ctrl and shift: tries to evaluate.
* Hover on element while holding ctrl, then clicking: go to definition.
Autocompletion in code ¶
* On empty space: shows symbols reachable through the current module's imports.
* Writing a name: shows all matching types, functions and variables.
* In between a name: shows all matching symbols, allowing to overrite the current one holding the control key.
* Writing a name inside a with(...) { } block: shows also members of the with symbol.
* After a type name: shows constructors and static opCalls.
* After a variable name: shows opCalls if the variable is a class or struct, or shows invocations if the variable is a function pointer or delegate.
* After a dot after a type name, call, this or super: shows members excluding op* methods.
* After "op" after a dot after a type name, call, this or super: shows op* methods.
* After the case keyword: shows possible enums values, if switching over an enum.
* Before an argument of a function call: show parameters and overloads.
* After goto, break and continue: shows possible target labels.
* Inside a version(): shows versions.
* Inside a debug(): shows debugs.
* In a function argument name: suggest possible names.
* After a type: show possible names to make a variable declaration.
Autocompletion in ddoc ¶
* Writing $ (optionally followed by a name) or pressing ctrl+space: shows macros.
* Writing a name or pressing ctrl+space at the start of the line: shows standard ddoc sections and macros.
Keyword proposals are also shown, according to the context in which you are writing.
Other tips ¶
* When completing a method that can be treated as a setter, if you press '=', then it will be autocompleted as a setter. Else, it will be autocompleted as a method.
* Go to definition also works in comments for top-level types and functions.