In case you want to have an IDE locally, but have your Development environment be on a VM
- Install Atom on your local (host) machine: https://atom.io/
- Install the "remote-sync" package: https://atom.io/packages/remote-sync
- Ensure Vagrant is running (e.g.
vagrant up
) - Create an empty directory on your local (host) machine that you want to "sync" with a directory on the Vagrant VM
- Open that empty directory in Atom
- Right click on it, select "Remote Sync -> Configure"
- Fill in the SSH configuration details
- Hint, run
vagrant ssh-config
to get these details for a Vagrant VM - You can test them by trying:
ssh -p [port] -i [identityfile] [user]@[hostname]
- For the remote folder, you can use a relative path (based on user's home directory)
- Hint, run
- Right click on the empty folder again, select "Remote Sync -> Download Folder". Wait while it syncs your remote folder down to the host.
- Edit the files. If you have it upload on save (see configuration of "remote-sync"), then saving will upload the changes to Vagrant.
- Otherwise, you can "Remote Sync -> Upload File" by right clicking on the individual file
- You can also "Monitor File" for remote changes (to sync down to your local machine when changed remotely)
This is useful for Ruby coding in Atom on Windows. You do however have to install Ruby and Rubocop on Windows.
- Install Ruby on Windows per https://rubyinstaller.org/
- Install Ruby DevTools per https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
- Install Rubocop
gem install rubocop --platform=ruby
gem install rubocop-rspec --platform=ruby
- Test it to ensure it's working:
rubocop [path-to-an-rb-file]
- In Atom, install Linter and Linter-Rubocop
- You may need to configure linter-rubocop to use the full path of your rubocop install (find it using
which rubocop
)
- You may need to configure linter-rubocop to use the full path of your rubocop install (find it using
- That's it! Now anytime you open or edit a Ruby file, you'll get warnings if you disobey rubocop's suggestions!