Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL command mode #9249

Closed
scabug opened this issue Mar 25, 2015 · 4 comments
Closed

REPL command mode #9249

scabug opened this issue Mar 25, 2015 · 4 comments

Comments

@scabug
Copy link

scabug commented Mar 25, 2015

As reported at https://github.com/scala/scala/issues/4392, not everyone appreciates REPL's colon-command syntax. Since JLine already supports vi mode line edits, one accommodation would be to recognize a colon while in escaped edit mode, erase the line, draw a colon and accept command text.

This improvement would delight that fraction of users who <3 vi and also use a lot of ::. Probably under a flag.

This would make even more sense with line healing enabled.

scala> 42
res0: Int = 42

scala> :: Nil
res1: List[Int] = List(42)
@scabug
Copy link
Author

scabug commented Mar 25, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9249?orig=1
Reporter: @som-snytt
Affected Versions: 2.11.6

@scabug
Copy link
Author

scabug commented Apr 19, 2015

Li Haoyi (lihaoyi) said:
This is "fixed" in the Ammonite REPL, which doesn't use special colon-commands at all

@ 42
res4: Int = 42
@ ::
res5: scala.collection.immutable.::.type = ::

I have never used vim mode, but since we're not hogging syntax you could give it a shot

@SethTisue
Copy link
Member

SethTisue commented Apr 29, 2020

@som-snytt I'm inclined to close this as I don't really see a problem here. maybe it's me. want to convince me/us to leave it open?

the :: thing doesn't strike me as important. it's easy to work around by typing a space first

@som-snytt
Copy link

JLine 3 offers more and better options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants