Score:1

How to open Ubuntu files in an interface friendly editor from Windows?

co flag

I am using Ubuntu app inside the Windows 10. I am writing some programs inside the Ubuntu OS, able to edit the files through the Vim editor from terminal interface.

I am wondering if there is a way to open the files in Ubuntu through the interface friendly editor like Vs-code? It will be super cool. Like for example opening Vs-code in Windows and somehow configure it to access directories inside the Ubuntu system.

Let me know if you need any more specific details. Thanks

Score:1
vn flag

Absolutely. In Windows VSCode, install either:

  • The "Remote - WSL" extension
  • The "Remote Development" extension pack, which includes the "Remote - WSL" extension, along with similar features for Docker and SSH.

Once you've installed that, from inside your Ubuntu instance, you can:

code .

... to open the current directory in VSCode. Or:

code filename

to open a particular file.

You can also start from inside VSCode, and open any of your WSL instances to browse the directory structure. You'll find an icon for this that looks like "><" stacked together at the bottom left of the status-bar. That's the "Open a Remote Window" tool.

Alternatively, Ctrl+Shift+P and type "remote" to get a list of the features available from those extensions.

This extension creates a server running inside Ubuntu with which VSCode communicates. It not only allows editing, but also connecting to debuggers in Ubuntu, etc.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.