[Help migrate from VSCode]

Hello,

I’m looking to transition from VSCode to Emacs. I primarily work through a remote connection to my home laptop using Tailscale. Could someone recommend a guide on setting up remote-SSH in Emacs, similar to how it’s done in VSCode? Additionally, any guidance on setting up development containers in Emacs would be greatly appreciated.

Thank you very much!

Oh, you’re in for a tread!

Emacs’s SSH capabilities are way beyond what VSCode can do especially if you can’t install the connector, or what ever the remote part for VSCode is called.

Just open a file with C-x C-f or M-x find-file then in the mini buffer at the bottom get rid of everything (could require M-backspace and or C-backspace), now add /ssh:user@fqdn:some_path and hit enter.

If you opened a file, use it like normal but you can also open directories and use dired and many other modes and Emacs plugins. If you set (setq dired-dwim-target t) and open a second dired you have a commander style file manager, where you can copy file from local to remote or from remote to remote in all combinations. Maybe try M-x shell to get a remote shell.

How would you like it, if you could use /ssh:user@fqdn|sudo:other_user@fqdn:/some/path?
Also how about you can use M-x magit and remote control the repository on the remote host through SSH and sudo? Then fire a quick M-! systemctl reload service_x?

If you know, you will want to visit the location in the future and are to lazy to type the whole thing all the time, you can use C-x r m to save it as a bookmark.
Use C-x r l to list your bookmarks.

This is the power of Tramp!
C-u C-h i then enter tramp in the minibuffer to read the manual - find the abbreviation for sudo to root in quickstart :wink:

6 Likes

You’ll probably want to run Emacs in daemon mode and run emacsclient instances when you connect to the laptop. See the Emacs manual for details.

2 Likes