简体   繁体   中英

how would I configure a ruby on rails closing tag %> in atom

In atom, while using .erb files my basic desire is to map a closing tag %> whenever I hit tab after typing <% or <%=

I do have emmet installed and it automatically wants to type <<%></%> , this isnt ideal...

If you have the Rails language package installed and the file extension is .erb then just type "=" (without the quotes) and then tab & it will give you both the opening & closing tags.

Typing "-" and tab will give you the non-display tags.

For those who might still be having an issue with this and have the ' language-ruby-on-rails ' package already installed, check if you've installed emmet or some other shorthand helper package.

In the event that you do, consider either disabling emmet(or other shorthand package) entirely or configuring it to not interfere with those snippets generated by language-ruby-on-rails.

Maybe you can try setting a macro with this atom package:

https://atom.io/packages/atom-macros

I haven't used it myself, might be worth looking into for your needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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