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

wished feature: multi line editing in history #47

Open
c0b opened this issue Apr 27, 2016 · 0 comments
Open

wished feature: multi line editing in history #47

c0b opened this issue Apr 27, 2016 · 0 comments

Comments

@c0b
Copy link

c0b commented Apr 27, 2016

I understand current implementation of history is by lines only; same as in bash or python REPL; but came from python world, I usually use ipython (which is a 3rd party pip package) instead of the default python shell that provides additional features like history persistence, and this nice feature: multi lines editing in history

if node doesn't want to improve its default REPL shell line editing experience, I would wish this nice feature can be done by some 3rd party project like this Node Enhanced Shell, or by a plugin

➸ ~/.local/bin/ipython
Python 2.7.10 (default, Oct 14 2015, 16:09:02) 
Type "copyright", "credits" or "license" for more information.

IPython 4.1.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: def fibonacci(n):
   ...:     a, b = 1, 1
   ...:     while a < n:
   ...:         a, b = a+b, a
   ...:     return a
   ...: 

In [2]: fibonacci(3)
Out[2]: 3

In [3]: fibonacci(4)
Out[3]: 5

In [4]: fibonacci(18)
Out[4]: 21

In [5]: def fibonacci(n):                  <= here is brought by arrow up key, it can find back multi lines for editing
    a, b = 1, 1
    while a < n:
        a, b = a+b, a
    return a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant