简体   繁体   English

Sublime Text在一行显示CSS和Javascript

[英]Sublime Text displaying CSS & Javascript in a single line

I'm facing a problem in Sublime Text where all my CSS & Javascript are displayed in a single line. 我在Sublime Text中遇到了一个问题,其中所有CSS和Javascript都显示在一行中。 So far I have no problem in displaying HTML. 到目前为止,我在显示HTML方面没有问题。

Currently: 目前:

body,h1,h2,h3,h4,h5,h6{font-family:"Open Sans",sans-serif}.bold.btn,.sbold.btn{letter-spacing:0}

I wish to display it in a structural form: 我希望以结构形式显示它:

body,h1,h2,h3,h4,h5,h6{
     font-family:"Open Sans",sans-serif
}

.bold.btn,.sbold.btn{
     letter-spacing:0
}

I have searched through online but failed to find any solution. 我已经在线搜索了,但是找不到任何解决方案。 Any help will be greatly appreciated 任何帮助将不胜感激

You can use a beautifier plugin from https://packagecontrol.io/packages/HTML-CSS-JS%20Prettify . 您可以从https://packagecontrol.io/packages/HTML-CSS-JS%20Prettify使用美化插件。 This allows you to reformat text and also comment 'beautify ignore' can be used for ignoring the reformatting of text. 这使您可以重新格式化文本,还可以使用注释“美化忽略”来忽略文本的重新格式化。 In this way the css and javascript codes can be split into different lines and preferable reformatting of text can be done. 这样,css和javascript代码可以分为不同的行,并且可以对文本进行更好的重新格式化。 More instructions about installing and usage of the plugin can be found in the above link. 可以在上面的链接中找到有关插件安装和使用的更多说明。

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

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