Alternative to basic text editors in ubuntu wsl
Solution 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/
Solution 2
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.
Solution 3
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
Solution 4
- 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.
Related videos on Youtube
cap
Updated on September 18, 2022Comments
-
cap over 1 year
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?
-
DK Bose about 5 yearsI 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.
-
sancho.s ReinstateMonicaCellio about 5 yearsWhat editor did you finally use?
-
-
Rich Andrews almost 5 yearsdefinitely FTW!
-
WrRaThY over 2 yearsTHAT! this should be the accepted answer
-
finneycanhelp about 2 yearsBroken link --> code.visualstudio.com/remote-tutorials/wsl/run-in-wsl