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

[feature request] Allow multiline up arrow (like Chrome Devtools) #45

Open
Jamesernator opened this issue Jan 2, 2020 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@Jamesernator
Copy link

Jamesernator commented Jan 2, 2020

Currently node's repl is pretty painful when dealing with multiline expressions/statements like:

Point = class {
  x; y;
  constructor(x, y) {
    this.x = x;
    this.yy = y;
  }
}

After entering such an expression often you'll notice is has an error somewhere, however to fix the error it'll generally involve going back to each line in order and entering it again e.g.:

https://1drv.ms/v/s!AqOK_5mhCFkag7VLMCfWVeCX_IFTtA?e=I6ikhd

Now chrome devtools/ndb has a nice feature in that a single up arrow goes to the last set of statements evaluated and be navigated entirely using a keyboard using Enter and Shift-Enter to navigate e.g.:

https://1drv.ms/v/s!AqOK_5mhCFkag7VMdWd_CJqhe_X9Ig?e=Gm86DL

I'd like to propose doing the same with Node's REPL.

It's a lot easier to work with as you don't need to do a bunch of up-arrows to re-enter every single line of the previous expression in order to fix it. The current behavior is also pretty error prone, especially for functions where you might accidentally re-order statements creating new errors and hence having to redo them all over again.

@Jamesernator Jamesernator changed the title [feature request] REPL: Allow multiline up arrow (a la Chrome Devtools) [feature request] Allow multiline up arrow (a la Chrome Devtools) Jan 2, 2020
@Jamesernator Jamesernator changed the title [feature request] Allow multiline up arrow (a la Chrome Devtools) [feature request] Allow multiline up arrow (like Chrome Devtools) Jan 2, 2020
@devsnek devsnek added the enhancement New feature or request label Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants