Some editor commands not available in REPL input box

2 views
Skip to first unread message

Marcio Mazza

unread,
Oct 16, 2009, 12:58:31 PM10/16/09
to cusp-development
There are some commands which I regard as very useful when editing text in Eclipse:

- Move Lines Up (Alt+Up)
- Move Lines Down (Alt+Down)
- Duplicate Lines (Ctrl+Alt+Up)
- Copy Lines (Ctrl+Alt+Down)
- Insert Line Above Current Line (Shift+Ctrl+Enter)
- Insert Line Below Current Line (Shift+Enter)

... among others. None of those is available in the REPL input box. Why?

I guess that REPL input is not an "editor" like view, but something close to it. Could it be (or just have all the features) of an editor view?

Marcio Mazza

unread,
Oct 16, 2009, 1:22:16 PM10/16/09
to cusp-development
... and also does not work in REPL input:

- Delete Line (Ctrl+D)


2009/10/16 Marcio Mazza <marci...@gmail.com>

Gorsal

unread,
Oct 16, 2009, 6:22:17 PM10/16/09
to Cusp Development
I'll look into this. Certainly, the repl view extends the ViewPart
class which is probably why it doesn't have these features. In the
meantime, do you really need to type in the REPL view? I, personally,
just use the following commands in the Lisp Editor

Alt+E = evaluate top level expression
Alt+R = evaluate current expression cursor is in

Alt+M = macroexpand-1 current expression
Alt+[ = macroexpand-1 toplevel expression

And, i think,
Alt+Shift+M = macroexpand-all current expression
Alt+Shift+[ = macroexpand-all toplevel

Notice that toplevel is defined as the open parentheses being all the
way to the left. Cusp will enforce this with its syntax indenting, but
if you have code which needs reformatting simply highlight that code
and press Shift+Tab to indent it. Beware if you're code is >2000
lines: there is no cancel button on the indenting. There should be,
but there isn't. I will have to change that also, i'll wait till i
rewrite that section in clojure, unless someone absolutely needs it.

Marcio Mazza

unread,
Oct 18, 2009, 8:39:30 AM10/18/09
to cusp-dev...@googlegroups.com
Thanks for the method suggestion, Gorsal. In fact that was the way I used to experiment in emacs. I will try it out again.
And resolving the usability issues we find about the REPL, different ways of coding might flourish.

About formating large pieces of code... there should be no such delay. I created a thread for that subject (I suggest we talk about it there):
http://groups.google.com/group/cusp-development/browse_thread/thread/a5579b35dc2130ac

2009/10/16 Gorsal <se...@tewebs.com>
Reply all
Reply to author
Forward
0 new messages