Is there any Sublime Text intellisense for HTML when editing Ruby files?

I like Sublime Text 2 as the editor of my Ruby on Rails project, however when I edit the .erb files I don't get any html help.

For example, if I typed: <input type=" , I would like to see a list of" text "," button "," file ", etc.

I like the support of Visual Studio intellisense for HTML, is there something similar for Sublime and Ruby on Rails?

+6
source share
2 answers

Sublime Text built intellisense for html, even when editing .erb files. This is even a fuzzy match instead of exact substring matching, like most intellisense tools.

  • Make sure your syntax is html (rails). Press ctrl+shift+p and type Set Syntax: HTML (Rails)
  • Press ctrl+space when you want intellisense popup menu

If you want intellisense to pop up automatically, rather than pressing ctrl+space , you can change the "auto_complete_triggers" parameter in the .sublime_settings settings. For example, if you want the intellisense popup to appear after entering < or = , you must add it to your user settings file:

"auto_complete_triggers": [ {"selector": "text.html", "characters": "<="} ]

example of sublime text intellisense

+8
source

If you want HTML intellisense, follow these steps: 1) CTRL + SHIFT + P → Install a new package 2) Type emmet 3) Install emmet.io 4) Voila, you are ready with HTML intellisense in sublime text 2.

0
source

Source: https://habr.com/ru/post/922250/


All Articles