簡體   English   中英

VSCODE - 如何在rails html.erb文件中自動關閉ruby的html代碼

[英]VSCODE - How to auto closing html code of ruby on rails html.erb file

我想自動關閉html.erb文件中的html代碼。
我該怎么辦?


Added screenshots


在此輸入圖像描述

  1. 安裝Ruby擴展。
  2. 將其添加到您的用戶設置:

     "emmet.includeLanguages": {"erb": "html"} 

erb和ruby的例子:

VSCode用戶設置

您不需要安裝任何擴展,只需將其添加到文件末尾的VSCode中的User settings.json文件中,它就像魅力一樣。

"emmet.showSuggestionsAsSnippets": true,
"emmet.includeLanguages": {"html.erb": "html", "erb": "html"}

有關emmet建議訂購的更多信息

安裝自動關閉標記擴展

默認情況下包含html.erb文件

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM