[SI-9249] REPL command mode Created: 25/Mar/15  Updated: 19/Apr/15

Status: Open
Project: Scala Programming Language
Component/s: Repl / Interpreter
Affects Version/s: Scala 2.11.6
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: A. P. Marki Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

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)



 Comments   
Comment by Li Haoyi [ 19/Apr/15 ]

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

Generated at Sat Oct 20 15:39:28 CEST 2018 using JIRA 7.9.1#79001-sha1:60970b42586a2ec2760ed6cfe825b26961e62b9e.