Julia: make REPL modes sticky

Created on 3 Nov 2016  路  10Comments  路  Source: JuliaLang/julia

We all kind of agreed this would be better some time ago. I suspect that @Keno never implemented this because he has his REPL configured so it's already the case, but we should make it the default for everyone.

REPL help wanted

Most helpful comment

I actually think I would prefer having help mode be sticky as well and this is probably a more noobie-friendly default to be consistently sticky.

All 10 comments

Could you explain what it means for a mode to be "sticky" in the context of the REPL? Sorry, I'm not familiar with the terminology.

Sticky means that after you evaluate something in a mode, your next prompt is in the same mode.

I'm not sure I'd want that for help mode.

Only the shell mode. I agree it's not what you want for help mode.

Fair enough. Can we have a default stickiness map where shell mode defaults to sticky?

I often find myself wishing that help modes are not part of the command history, but I suspect most people are fine with this behavior though.

I think help mode been sticky too would be consistent and not so inconvenient.

Here come some arguments:

  • having sticky modes in general is desired for most of us.
  • Making help mode non-sticky is confusing, from the behavior point of view of the REPL.
  • In MATLAB you have a little button to ask for help which opens a window, much more intrusive. You can also do help <name> but this cannot be considered as a mode.
  • Last but not least, sticky mode for help would allow to have 2 terminals in which run Julia code on one and ask for clarifying questions on the other. This makes me imagine lots of possibilities.

The filtering of the command history could be solved by ? UP-ARROW for only help history, ! UP-ARRoW for shell history and so on... while skipping them on the usual history.

I actually think I would prefer having help mode be sticky as well and this is probably a more noobie-friendly default to be consistently sticky.

I tried having all modes be sticky for a few weeks, and it really just drove me crazy. I think it may sense with shell mode, but I found myself stumbling almost every time I wanted to go back to the normal prompt after using help mode.

It might be nice to have this easily configurable per-mode on master for a bit, so that people can try various stickiness combinations and see how they work in practice (e.g. sticky on shell mode only). I had thought I was going to like having everything be sticky, but I did not in the end.

maybe should tie into https://github.com/JuliaLang/julia/issues/14081, have a stickiness modifier as part of a switcher menu

Was this page helpful?
0 / 5 - 0 ratings

Related issues

helgee picture helgee  路  3Comments

felixrehren picture felixrehren  路  3Comments

i-apellaniz picture i-apellaniz  路  3Comments

wilburtownsend picture wilburtownsend  路  3Comments

StefanKarpinski picture StefanKarpinski  路  3Comments