** VS Code has a handy extension that will automatically generate tags for you. ** ** I don't want to start knowing this. After all, I've been doing inefficient work without knowing it, so I've put together an extension that I think should be included for the time being.
PrintCode You can print the code. The print screen opens in the browser and you can print. Detailed settings are not possible. It was nice to have the code readily available on paper when I was just studying.
Ruby It contains basic functions such as coloring the code so that it is easy to see.
Auto Close Tag
If you type div
in the HTML tag and press the tab key, it will be automatically converted to<div> </ div>
.
I want to be careful, it doesn't work with erb.
To deal with this, see "[Enable automatic html tag generation function in erb](https://qiita.com/Tigris3313/items/3e79f4d9f592f80fac67" Enable automatic html tag generation function in erb ")". ..
ERB-VSCode-Snippets
Type pe
and press the tab key to automatically generate<% =%>
, and ʻer will automatically generate
<%%> . There are other codes that can be converted besides
pe and ʻer
.
ERB Helper Tags
It is a function that generates helper tags.
If you type jpt
,<% = javascript_pack_tag''%>
will appear as a candidate.
Rails has a lot of helper tags such as link_to
and form_with
, so it's useful to know.
There are a few introductions, but there are many other extensions. There are a lot of extensions that will make your work much more efficient just by adding one or two. If you wonder if there is such an extension, there are many cases. At the beginning of writing a program, you should consciously search for it.
Recommended Posts