简体   繁体   English

Sublime Text可以自动完成CSS类吗?

[英]Can Sublime Text Autocomplete CSS Classes?

Suppose I have this in my index.html: 假设我在index.html中有这个:

<div class="foo"></div>

And the HTML page is linked to layout.css, is there any way that Sublime Text 2 can make an autocomplete suggestion for .foo when I'm typing something like .f or .fo (...)? 并且HTML页面链接到layout.css,当我输入类似.f.fo (...)的东西时,Sublime Text 2是否可以为.foo制作自动完成建议?

I'm asking this because a lot of times I'm mistyping a class name and it's takes time to find that out. 我问这个是因为很多次我错误地输入了一个类名,而且需要时间才能找到它。 This feature, if exists, will help me a lot. 此功能(如果存在)将对我有所帮助。

I've had that problem once.By default sublime only completes words on the opened file.I found that sublimeallautocomplete has a solution for that.But you have to open both css and html on sublime so that it looks words on files opened in sublime.you better look on sublimetext forums also. 我曾经遇到过这个问题。默认的sublime只能在打开的文件上完成单词。我发现sublimeallautocomplete有一个解决方案。但是你必须在sublime上打开css和html,这样才能看到在sublime中打开的文件上的单词你最好再看看sublimetext论坛。

Just installing All Autocomplete didn't solve the problem for me inside .css files (it worked only in .html files). 只是安装All Autocomplete并没有解决我在.css文件中的问题(它只能在.html文件中使用)。 For anyone having similar issue, this is the solution: https://github.com/SublimeTextIssues/Core/issues/283 对于任何有类似问题的人来说,这是解决方案: https//github.com/SublimeTextIssues/Core/issues/283

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

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