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?
-
1I added a WSL tag to your question. If indeed you are using Ubuntu via WSL, please edit your question's title to make that clear. – DK Bose Feb 28 '19 at 02:42
-
What editor did you finally use? – sancho.s ReinstateMonicaCellio Mar 01 '19 at 08:51
4 Answers
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.
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

- 141
-
Broken link --> https://code.visualstudio.com/remote-tutorials/wsl/run-in-wsl – finneycanhelp Mar 10 '22 at 21:50
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/

- 14,674
- 11
- 44
- 97
- Download visual studio code for windows
- In the ubuntu terminal type "code <path of file/folder you want to open>".
Example:
code ./codes_folder
code ./codes_folder/1.c
- If you want to use any other editor, use the appropriate command instead of code.

- 71,754

- 11