[Introduction to Scheme]1 Edwin Basic use

Source: Internet
Author: User

Edwin is a Windows-style editor using the front end of the MIT Scheme System. Start Edwin is actually the first start Scheme system, and then start to Edwin front end. Edwin is a scheme -written interactive editor that supports the editing and job-hunting of scheme expressions.


Edwin Mode:

Edit the mode of the Scheme file, if a . SCM file is loaded, the corresponding Edwin of this edit area is in Edwin mode. In this mode, you can write a Scheme program, or you can evaluate an expression. The values that are normally calculated are displayed at the bottom of the interaction line, but no error message is displayed and the debug system cannot be entered.

REPL Mode:

REPL is read-evaluation-print-loop, read - evaluation - print - loop. In this mode, you can see that the status bar shows "Repl:lsten". At this point the system is in the normal scheme interaction mode, and all output is displayed in the editor window, but is executed in Edwin . In this case, all information can be output, including entering debug mode.



For multi-line input expression Four, press C-iafter wrapping, the system is able to automatically align the cursor to the appropriate position.

c-v: Turn down one screen m-v: Turn up one screen
c-a : Move to beginning c-e: Move to end of line

C-b: Move left one c-f: Move right One

C-p: Move up one c-n: Move down one

c-x c-e evaluates the expression on the left ( after the cursor is in the expression but on the same line ) or on the previous ( the cursor is in the expression but before the next expression and not the same line ) .

All code in the region can be evaluated with C-m-z, if you use Edwinunder Windows , you must first clear the top of the copyright information, and so on.


Loading a file can take

(CD "D:\\lisp\\scheme")

(Load "SCHEME1.SCM")

Then press c-x C-E to display

;Loading "SCHEME1.SCM" ... done

When there are a lot of functions and so on need to write, it is recommended to use another Notepad, etc. to save.


Once you have entered the Edwin, you can exit by using the following method:

c-xz stops Edwin and returns to Scheme (Suspend-edwin). The editor procedure call into Edwin returns normally. Next, if you call edit , the Edwinis restarted from where it was last stopped.

C-xc                Save any modified buffers, close edwin and returns to scheme (Save-buffers-kill-edwin) . This is similar to the suspend-edwin command, but the next call to edit will reinitialize the editor.

C-x C-z            stop edwin and Hang scheme , give control to the operating system's command interpreter . When scheme is re-enabled ( use the command interpreter's job control (Job-control) command , edwin will automatically restart from where it stopped. This command is the same as the c-x c-z command emacs .

c-xc-c Save any modified buffers, and then close Edwin and Scheme (save-buffers-kill-scheme). TheScheme process is terminated by handing control over to the operating system's command interpreter. This command is the same as Emacs 's c-x c-c command.

Completion of global variables: Type the first few characters of a variable, and then type c-m-i,Edwin will attempt to complement the name of the variable, based on the set of variables within the current bounds. If a parameter prefix is given,c-m-i will complete the name, based on the current restricted (interned) symbol set ( including the boundary variable as a subset ).



The file is opened and closed, and the editor is closed. Press Ctrl-X Ctrl-F to open a file. If the file you specified does not exist, a new file is created. The initial path is set to ' C: ' And you should modify the path before opening the file. Press C X C-S to save the file, and the C-x C-w file is saved as. To exit the editor, press C -x C -c .


Indent. Press C -i or TAB you can indent.


Cut, copy and paste. We can't use the mouse, so copying (cutting) and pasting will be inconvenient. But you can do it like this:

First, move the cursor to the beginning of the area you want to select by using the arrow keys, and then press C-SPACE .

Then move to the end position by pressing C -w to cut the area, press M -w to copy the area.

Finally, move to the area you want to copy and press C-y .


Evaluation S-expression

M-zThe key is used to evaluate the define s-expression to begin with.

The key M-: is used to evaluate the S-expression in a small buffer. This is usually used to test -z a function that evaluates with M.

The key C-x C-e is used to evaluate *scheme* the S-expression in the entire buffer.

[Introduction to Scheme]1 Edwin Basic use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.