NextPrevUpTopContentsIndex

3.9 Inserting text

This section contains details of commands used to insert text from the kill ring--see Deleting and killing text--and various other commands used to insert text and lines into the buffer.

Un-Kill

Editor Command

Arguments: None
Key sequence: Ctrl+Y

Selects (yanks) the top item in the kill ring (which represents the last piece of text that was killed with a kill command or saved with Save Region) and inserts it before the current point. The current point is left at the end of the inserted text, and the mark is automatically set to the beginning of the inserted text.

A prefix argument ( Ctrl+U number ) causes the item at position number in the ring to be inserted. The order of items on the ring remains unaltered.

Rotate Kill Ring

Editor Command

Arguments: None
Key sequence: Meta+Y

Replaces the text that has just been un-killed with the item that is next on the kill ring. It is therefore possible to recover text other than that which was most recently killed by typing Ctrl+Y followed by Meta+Y the required number of times. If Un-Kill was not the previous command, an error is signalled.

Note that the ring is only rotated and no items are actually deleted from the ring using this command.

A prefix argument causes the kill ring to be rotated the appropriate number of times before the top item is selected.

New Line

Editor Command

Arguments: None
Key sequence: Return

Opens a new line before the current point. If the current point is at the start of a line, an empty line is inserted above it. If the current point is in the middle of a line, that line is split. The current point always becomes located on the second of the two lines.

A prefix argument causes the appropriate number of lines to be inserted before the current point.

Open Line

Editor Command

Arguments: None
Key sequence: Ctrl+O

Opens a new line after the current point. If the current point is at the start of a line, an empty line is inserted above it. If the current point is in the middle of a line, that line is split. The current point always becomes located on the first of the two lines.

A prefix argument causes the appropriate number of lines to be inserted after the current point.

Quoted Insert

Editor Command

Arguments: args
Key sequence: Ctrl+Q &rest args

Quoted Insert is a versatile command allowing you to enter characters which are not accessible directly on your keyboard.

A single argument key is inserted into the text literally. This can be used to enter control keys (such as Ctrl+L) into a buffer as a text string. Note that Ctrl is represented by ^ and Meta by ^] .

You may input a character by entering its Octal Unicode code: press Return to indicate the end of the code. For example enter

Ctrl+Q 4 3 Return

to input # .

If you have specified that Alt acts as your Meta key, you may find that some useful Alt -modified keys are not available in the usual way from within LispWorks. For example, Alt+3 gets interpreted as Meta-3 . As a way around this problem, Quoted Insert temporarily suspends LispWorks editor processing of Alt as Meta. For example, you can input # on a UK Macintosh keyboard by entering

Ctrl+Q Alt+3

Self Insert

Editor Command

Arguments: None
Key sequence: key

editor:self-insert-command p &optional char

This is the basic command used for inserting each character that is typed. The character to be inserted is char . There is no need for the user to use this command explicitly.

Dynamic Completion

Editor Command

Arguments: None
Key sequence: Meta+/

Tries to complete the current word, by looking backwards for a word that starts with the same characters as have already been typed. Repeated use of this command makes the search skip to successively previous instances of words beginning with these characters. A prefix argument causes the search to progress forwards rather than backwards. If the buffer is in Lisp mode then completion occurs for Lisp symbols as well as words.

Expand File Name

Editor Command

Arguments: None
Key sequence: Meta+Tab

Expands the file name at the current point. Issuing this command twice in succession brings up a list of possible completions in a popup window.


LispWorks Editor User Guide (Macintosh version) - 23 Feb 2006

NextPrevUpTopContentsIndex