nus-cs2030 / 2021-s1

28 stars 48 forks source link

/edit throwing X11 Display Error in jshell (Resolved) #14

Open ngzixuan1997 opened 4 years ago

ngzixuan1997 commented 4 years ago

Summary Running into exception thrown when executing /edit

Description Was trying out vim/jshell during first lecture. However, ran into an error when wanting to edit sets of codes within jshell. Specifically, I tried /edit, with the following errors (Ref. to Screenshot).

I've also tried (export DISPLAY=:0.0) w/o parentheses, and removing the ".0" at the end, with no avail. I know jshell is meant for simple testing, but worries me if it's to bring up another issue in future.

1

yonggqiii commented 4 years ago

Hey @ngzixuan1997 thanks for posting this up. Prof Henry faced this as well and said that you need to set your jshell editor. The easiest way is:

in the shell: export JSHELLEDITOR=vim

or in jshell:

/set editor vim

Hope this helps!

ngzixuan1997 commented 4 years ago

Hihi @yonggqiii ! Yep thanks! It helped rectify the errors. Thanks a bunch! :D