laravel Sublime Text 2 代码提示
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19044878/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Sublime Text 2 Code Hinting
提问by user1995781
This is my first time with Sublime Text 2. I am trying it because people say it works best with Laravel. I have also installed some package such as Laravel Blade, Laravel Snippets, and etc.
这是我第一次使用 Sublime Text 2。我正在尝试它,因为人们说它最适合 Laravel。我还安装了一些软件包,例如 Laravel Blade、Laravel Snippets 等。
However, when I tried to play around with it, I found that it's code hinting doesn't work every well as compare to Dreamweaver. Let say for example, if I want to type "", the code hint does show the "h1" suggestion. But when I want to add in more thing into the h1 tag like style and etc, the code hint doesn't help at all. Also, I found that jQuery code hint doesn't work at all.
但是,当我尝试使用它时,我发现与 Dreamweaver 相比,它的代码提示并不能很好地工作。例如,如果我想输入“”,代码提示会显示“h1”建议。但是,当我想在 h1 标签中添加更多内容(如样式等)时,代码提示根本无济于事。另外,我发现 jQuery 代码提示根本不起作用。
Am I missing something? Or it is the actual behavior of Sublime Text? Is it possible to have the code hinting works like Dreamweaver and even better with Laravel support in Sublime Text?
我错过了什么吗?或者它是 Sublime Text 的实际行为?是否有可能让代码提示像 Dreamweaver 一样工作,并且在 Sublime Text 中使用 Laravel 支持甚至更好?
Thanks.
谢谢。
采纳答案by joydesigner
Sublime Text is a very powerful editor. But it is not the same thing as an IDE like Visual Studio, phpStorm.
Sublime Text 是一个非常强大的编辑器。但它与 Visual Studio、phpStorm 之类的 IDE 不是一回事。
Compare to IDE, it is light weighted, but still very powerful.
与IDE相比,它是轻量级的,但仍然非常强大。
Here is one good article on how to setup a good workflow on sublime you may have a look.
这是一篇关于如何在 sublime 上设置良好工作流程的好文章,您可以看看。
Perfect Workflow in Sublime Text
You need to install some plugins to make the editor customized as what you want.
您需要安装一些插件才能根据需要自定义编辑器。
For code completion you can try plugin called "Emmet" which was "zencode" before.
对于代码完成,您可以尝试名为“Emmet”的插件,它之前是“zencode”。
Here is the documentationof how to make your coding more efficient by using "Emmet"
这是有关如何使用“Emmet”提高编码效率的文档
After reading this, trying some plugin, I believe you will find lots of funs on using it. Enjoy~
看完本文,尝试一些插件,相信你会发现使用它的乐趣很多。享受~
回答by mckendricks
For the Laravel integration, check out the laravel IDE helperand use it along with Sublime CodeIntel. The IDE helper is installed in your laravel project via composer and is used to generate a helper file that is used by the CodeIntel plugin to provide better completion support. As for the HTML completions, check out the various HTML packages for sublime, such as HTML5 and HTML attributes. I haven't used those ones in particular so I can't say how well they work, but there is bound to be a package for ST to give you what you want.
对于 Laravel 集成,请查看laravel IDE 助手并将其与Sublime CodeIntel一起使用。IDE 帮助程序通过 composer 安装在您的 Laravel 项目中,用于生成 CodeIntel 插件使用的帮助程序文件,以提供更好的补全支持。至于 HTML 补全,请查看 sublime 的各种 HTML 包,例如 HTML5 和 HTML 属性。我没有特别使用过这些,所以我不能说它们的效果如何,但是 ST 肯定有一个包可以给你你想要的东西。