Hi Wojtek,

> By the way, I wanted to clear a misunderstanding I seem to be having,
> regarding code evaluation in Vip. The wiki article says, that if I move to
> the command buffer and enter a Picolisp expression on a line of its own,
> then I can execute it by pressing Enter.

Oh, sorry! The article is outdated in this regard.

The Vip REPL now no longer behaves this way (triggering evaluation with an
opening parenthesis). Instead, it needs ": " (a colon and a space).

Practically, you get the colon by pressing ':' (as in Vim) or <space>. At this
point you can enter commands like "e" (edit), "w" (write) and so on (see the
full list in the 'command' function in the 'case C' body. BUT if you press
a(nother) space here, the rest of the line will be evaluated.

This is easier than it sounds ;)

Try this: Hit '-' a few times to get a bigger command window. Then hit space,
space,(+ 3 4 and <enter>. The command window shows

   : (+ 3 4)
   -> 7

The focus is back to the current edit window.

Or, you move to the command window permanently with "qj" or "^wj", and edit
expressions manually. You can (re)evaluate any line there by pressing <enter> on
it.


> While I'm on the topic, is there a way to evaluate arbitrary Picolisp code
> from *any* Vip buffer, i.e. sending region to the Picolisp REPL?

Not a region (in the sense of as part of a file), but you can evaluate ('load')
the whole file by pressing F7.

Or you copy some lines to the command window ('y' and 'p' commands) and evaluate
them there.

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to