JDK-8241950: JShell could support auto-indent

Robert Field robert.field at oracle.com
Thu Apr 9 20:05:31 UTC 2020


Thumbs up!

-Robert


On 2020-04-09 07:08, Jan Lahoda wrote:
> Thanks Robert. I've updated /set to do that, so now it looks like this:
>
> jshell> /set
> |  /set editor -default
> |  /set indent 4
> |  /set start -default
> |  /set feedback normal
> |
> |  Available feedback modes:
> |     concise
> |     normal
> |     silent
> |     verbose
> |
> |  To show mode settings use '/set prompt', '/set truncation', ...
> |  or use '/set mode' followed by the feedback mode name.
>
>
> Diff to previous iteration:
> http://cr.openjdk.java.net/~jlahoda/8241950/webrev.delta.00.01/
>
> Full updated patch:
> http://cr.openjdk.java.net/~jlahoda/8241950/webrev.01/
>
> What do you think?
>
> Thanks,
>     Jan
>
> On 06. 04. 20 17:37, Robert Field wrote:
>> Very cool!
>>
>> One nit:
>>
>> /set doesn't show indent.
>>
>>     jshell> /set
>>     |  /set editor -default
>>     |  /set start -default
>>     |  /set feedback normal
>>     |
>>     |  Available feedback modes:
>>     |     concise
>>     |     normal
>>     |     silent
>>     |     verbose
>>     |
>>     |  To show mode settings use '/set prompt', '/set truncation', ...
>>     |  or use '/set mode' followed by the feedback mode name.
>>
>> -Robert
>>
>> On 2020-04-03 08:21, Jan Lahoda wrote:
>>> Hi,
>>>
>>> The recent upgrade to JLine 3.14.0 allows us to enable auto-indent, 
>>> so that typing a '{' and pressing enter will automatically increase 
>>> the indent of following lines by 4, and typing a '}' will 
>>> automatically decrease the indent. The indent amount is configurable 
>>> using /set indent.
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~jlahoda/8241950/webrev.00/
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8241950
>>>
>>> What do you think?
>>>
>>> Thanks,
>>>     Jan


More information about the kulla-dev mailing list