简体   繁体   English

自动完成功能不适用于Textmate的Flex套件。 我该如何解决?

[英]Autocomplete not working in the Flex Bundle for Textmate. How do I fix?

I am being very hard headed and determined that I am going to give Textmate a solid try for my actionscript and flex projects. 我非常努力,决心要为Textmate的ActionScript和Flex项目提供扎实的尝试。 Work on the bundle has been a little lacking but what has been developed so far is pretty great. 捆绑软件方面的工作有些缺乏,但是到目前为止已经开发的非常棒。

I have run into some slight issues but able to figure them out and get things set up pretty well and I have already dug in and started customizing the snippets to suit my needs. 我遇到了一些小问题,但是能够弄清楚它们并进行了很好的设置,并且我已经开始研究并开始自定义片段以适合我的需求。

One thing that I have not been able to fix, figure out or find a straight answer for is regarding working with MXML files. 我无法修复,弄清楚或找到直接答案的一件事是关于使用MXML文件。 AutoComplete for Actionscript files seems to work great but I don't seem to get the same result when I am editing Actionscript inside the script block in a MXML file. 用于Actionscript文件的AutoComplete看起来效果很好,但是当我在MXML文件中的脚本块中编辑Actionscript时,似乎没有得到相同的结果。

I am hoping that someone that uses Textmate all the time could through some suggestions my way to help track down the issue. 我希望一直使用Textmate的人可以通过我的方式提出一些建议来帮助查找问题。 If I am in the actionscript code block and hit (option + esc) I get "no completion available" message. 如果我在动作脚本代码块中并单击(选项+ esc),则会收到“无可用完成”消息。

So I posted this "issue" on the textmate mailing list and I heard back from the creator of the flex bundle. 因此,我将此“问题”发布在textmate邮件列表上,并从Flex捆绑包的创建者那里收到了回音。 Simon basically told me that he had not enabled autocomplete feature to the flex mxml script blocks yet. Simon基本上告诉我,他尚未对flex mxml脚本块启用自动完成功能。 This is good to know that my shit wasn't broke and he offered the following solution so that auto complete will work in mxml script blocks. 很高兴知道我的狗屎没有被破坏,他提供了以下解决方案,以便自动完成功能可以在mxml脚本块中使用。

There's no issues, I just haven't got around to supporting autocompletion from within script blocks embedded in mxml. 没有问题,我只是还没有从嵌入在mxml中的脚本块中支持自动完成。 Although it seems to be pretty stable if you just go ahead and add the right scope (text.xml.mxml source.actionscript.3.embedded.mxml) to the command, as I have done in my dev branch: 尽管看起来很稳定,但是您可以像在dev分支中所做的那样,将正确的作用域(text.xml.mxml source.actionscript.3.embedded.mxml)添加到命令中:

http://github.com/simongregory/actionscript3-tmbundle/blob/sg/Commands/Auto%20Complete.tmCommand http://github.com/simongregory/actionscript3-tmbundle/blob/sg/Commands/Auto%20Complete.tmCommand

You can do the same thing with the auto import command and it'll add the import to the script block. 您可以使用auto import命令执行相同的操作,它将导入内容添加到脚本块中。

Cheers, Simon 干杯,西蒙

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM