Settings to be done when changing from Sublime Text to VScode (when writing Ruby On Rails)

Migrated the editor from Sublime Text to VScode. Therefore, we will introduce settings and extensions that allow people who used Sublime Text to use VS code without any discomfort.

Premise

--The environment is macOS --VScode is already installed

Initial setting

スクリーンショット 2021-01-04 15.57.57.png

If you open VScode, you will see a screen like this, so use command +, to open the settings screen. Let's set it.

スクリーンショット 2021-01-04 16.02.13.png __ · Files: Changed Auto Save to "after Delay" __ This will automatically save the file after you edit it.

__ · Editor: Change Font Size to "13" __

スクリーンショット 2021-01-04 16.02.59.png __ · Editor: Changed Tab Size to "2" __

スクリーンショット 2021-01-04 16.03.20.png __ · Editor: Change Word Wrap to "on" __ This will wrap the line and display it.

Change the color scheme

Then change the color scheme theme to something similar to Sublime Text. If you change it, it will look like an image, and I think it's infinitely similar to Sublime Text.

スクリーンショット 2021-01-04 18.27.07.png

If you are OK with the default theme, you can skip to (Next Step). Let's change it.

スクリーンショット 2021-01-04 17.01.11.png Open Command Pared with command + shift + P, type color in the form, and when you see Preferences: Color Theme selected, press Return.

スクリーンショット 2021-01-04 17.02.07.png Then type monokai and press return when you are sure that Monokai is selected.

Now you can change the color scheme theme.

Plugin installation

Next, install the necessary plug-ins.

スクリーンショット 2021-01-04 16.45.56.png Click on the icon that looks like four squares in the left sidebar. This will bring up a form to search for plugins. (* In the above picture, I have already installed the plug-in, so the installed plug-ins are listed in the INSTALLED column, but don't worry.)

スクリーンショット 2021-01-04 17.24.20.png Enter the name of the plugin you want to install in the form, select it and install it.

Here are some recommended plug-ins.

Japanese Language Pack for Visual Studio Code

It is a plug-in that translates into Japanese.

Ruby

Ruby language support. This is a must-have plugin for writing Ruby code.

VSCode Ruby

If you install the above plugin Ruby, it will be installed automatically. ERB syntax highlighting is enabled.

Endwise

It will automatically insert end. https___github.com_kaiwood_vscode-endwise_raw_master_images_endwise.gif

Ruby settings

Finally, set up Ruby.

スクリーンショット 2021-01-04 17.55.42.png

Open the settings screen again with command +, and click the file-like icon in the upper right to open settings.json.

スクリーンショット 2021-01-04 18.16.07.png As shown in the image, add the following at the end. (Don't forget to write, between the end of the original setting item and the setting to be added.)

"files.associations": {
    "*.erb": "erb"
},
"emmet.includeLanguages": {
    "erb": "html"
}

This completes the settings. If you restart VScode, all the settings will be reflected.

Reference site

Recommended Posts

Settings to be done when changing from Sublime Text to VScode (when writing Ruby On Rails)
[Updated from time to time] Ruby on Rails Convenient methods
[Ruby on Rails] From MySQL construction to database change
[Ruby on Rails] How to stop when Rails server cannot be stopped by Ctrl + C
[Ruby on rails + Mysql] Data migration procedure memo when switching from heroku to AWS
From 0 to Ruby on Rails environment construction [macOS] (From Homebrew installation to Rails installation)
From Ruby on Rails error message display to Japanese localization
[Ruby on Rails] Column restrictions when saving to DB (4 representatives)
Options for rails new and settings to be done after rails new
Ruby on Rails --From environment construction to simple application development on WSL2
How to use Ruby on Rails
Rails tutorial When rails new cannot be done due to different versions
Settings that should be done when operating a production environment with Rails
What to do when Blocked Host: "host name" appears in Ruby on Rails
Environment construction of Ruby on Rails from 0 [Cloud9] (From Ruby version change to Rails installation)
[Ruby on Rails] How to use CarrierWave
[Rails] Rails new cannot be done from Docker
Deploy to Heroku [Ruby on Rails] Beginner
Preparing to introduce jQuery to Ruby on Rails
[Ruby on Rails] How to use redirect_to
[Ruby on Rails] How to use kaminari
[Ruby on Rails] Button to return to top
Validation settings for Ruby on Rails login function
Deploy to Ruby on Rails Elastic beanstalk (EB deploy)
Things to be aware of when writing Java
[Ruby on Rails] How to display error messages
How to add / remove Ruby on Rails columns
When the Ruby on Rails terminal rolls back
[Ruby on Rails] How to install Bootstrap in Rails
[Ruby on Rails] How to use session method
VScode extension to learn efficiently when you are just starting programming with ruby, rails
[Ruby On Rails] De-root_path! Redirect notation from a nested "child" view to a nested "parent": show
[Introduction] Try to create a Ruby on Rails application
Method summary to update multiple columns [Ruby on Rails]
[Ruby on Rails] How to write enum in Japanese
Rails / Ruby: How to get HTML text for Mail
[Ruby on Rails] How to change the column name
[Ruby on Rails] Change URL id to column name
Deploy to Ruby on Rails Elastic beanstalk (Environment construction)
[Ruby On Rails] How to reset DB in Heroku
Ruby on Rails Tutorial Troublesome notes when running on Windows
(Ruby on Rails6) Reflecting the posted content from the form
(Ruby on Rails6) How to create models and tables
[Ruby On Rails] How to search and save the data of the parent table from the child table
[Ruby on Rails] I get a warning when executing RSpec due to a different gem version.