6

Currently I have a ubuntu terminal that I downloaded from the MS store. I would like to be able to edit code without using nano/vim/emacs. Is this possible? Can I use an external editor like visual studio or something of the like?

cap
  • 171

4 Answers4

5

WSL-OPEN FOR THE WIN!!

https://github.com/4U6U57/wsl-open

in WSL, set your default editor to WSL-OPEN:

export EDITOR=wsl-open

This will automatically translate the file to your default windows app for the associated EXT.

4

I had this problem and MS Visual Studio Code was excellent at solving this issue. Install it, and run "code ." and it will open with it. More detailed instructions below.

https://code.visualstudio.com/remote-tutorials/wsl/run-in-wsl

Jason
  • 141
1

You are asking about code editors under Ubuntu/WSL.

You may want text apps or graphical apps. And you need to specify the language your code uses.

If Eclipse works for you, this may be useful

https://stackoverflow.com/questions/39670891/eclipse-c-c-project-on-bash-on-ubuntu-on-windows

https://www.cs.odu.edu/~zeil/FAQs/Public/win10Bash/#installing-eclipse

For Netbeans

http://web.cse.msstate.edu/~crumpton/reference/Installing_NetBeans_IDE_for_use_with_WSL.pdf

Otherwise, this may be helpful

https://cepa.io/2018/02/20/linuxizing-your-windows-pc-part2/

1
  1. Download visual studio code for windows
  2. In the ubuntu terminal type "code <path of file/folder you want to open>".
    Example:
code ./codes_folder  
code ./codes_folder/1.c
  1. If you want to use any other editor, use the appropriate command instead of code.
Jorge Castro
  • 71,754
dileep
  • 11