简体   繁体   English

就像ReSharper for Visual Studio一样,在WebStorm中完成代码

[英]Code completion in WebStorm just like ReSharper for Visual Studio

I'm used to use Visual Studio as my IDE however I'd like to give WebStorm a go. 我曾经使用Visual Studio作为我的IDE,但是我想尝试一下WebStorm。

One feature that is really handy in Visual Studio (using ReSharper) when coding in JavaScript is that it creates the whole block for function or `for loops for you. 在JavaScript中进行编码时,在Visual Studio(使用ReSharper)中真正方便的一项功能是,它为您创建了整个function或`for循环块。 In WebStorms it seems that only the "function" word is auto completed for you. 在WebStorms中,似乎只有“功能”一词会自动为您完成。

In VS and ReSharper, I'm able to type fun then press TAB and the following statement is added for me 在VS和ReSharper中,我可以键入fun然后按TAB键,并为我添加了以下语句

function () {
    //CURSOR stops here
}

in WebStorm, if I type fun and choose the auto completion, only the word function is auto completed for me. 在WebStorm中,如果我输入fun并选择自动完成function ,那么只有单词function会自动为我完成。

The same for for loops. for循环也一样。 In VS+ ReSharper, I can type for and press TAB and the following statement is added for me: 在VS + ReSharper的,我可以键入for ,然后按TAB和下面的语句添加对我来说:

for (var i; i <= LENGTH; i++) {

}

QUESTION: Is there a way to get WebStorms to auto create these sort of code statements for us just like ReSharper does? 问题:有没有办法使WebStorms像ReSharper一样为我们自动创建这类代码语句?

ReSharper is from the JetBrains just like WebStorms so I'm not sure this is not standard. ReSharper就像WebStorms一样来自JetBrains,所以我不确定这不是标准。

Thanks 谢谢

Found it! 找到了!

In WebStorms, it's called Live Templates and it's very... very customizable. 在WebStorms中,它称为实时模板 ,而且非常...非常可定制。 Great IDE! 很棒的IDE!

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

相关问题 Visual Studio Code启用WebStorm中的建议代码JavaScript - Visual Studio Code enable suggestion code JavaScript like in WebStorm Visual Studio代码JavaScript代码完成 - visual studio code JavaScript code completion KnockoutJs和模板 - Visual Studio中没有代码突出显示/完成? - KnockoutJs and Templates - No code highlighting / completion in visual studio? Webstorm中的javascript&#39;for loop&#39;代码完成 - javascript 'for loop' code completion in Webstorm 如何使VSCode或WebStorm之类的JavaScript IDE在代码完成方面像Eclipse一样智能? - How to make JavaScript IDEs like VSCode or WebStorm to be as intelligent on code completion as Eclipse? 构造函数方法的 Visual Studio Code Intellisense 代码完成 - Visual Studio Code Intellisense code completion for constructor function methods 将服务工作者代码完成功能添加到JetBrains WebStorm - Add service worker code completion to JetBrains WebStorm 在 WebStorm 中为 node_modules 启用代码完成 - Enable code completion for node_modules in WebStorm Discord JS 模块导出 Visual Studio 代码完成/建议 - Discord JS Module Export Visual Studio Code Completion / Suggestions Visual Studio代码。 正则表达式仅搜索/替换撇号 - Visual Studio Code. Regex to search/replace just the apostrophe
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM