Alternative to basic text editors in ubuntu wsl

14,809

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

  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.
Share:
14,809

Related videos on Youtube

cap
Author by

cap

Updated on September 18, 2022

Comments

  • cap
    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
      DK Bose about 5 years
      I 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
      sancho.s ReinstateMonicaCellio about 5 years
      What editor did you finally use?
  • Rich Andrews
    Rich Andrews almost 5 years
    definitely FTW!
  • WrRaThY
    WrRaThY over 2 years
    THAT! this should be the accepted answer
  • finneycanhelp
    finneycanhelp about 2 years