All Manuals > LispWorks Editor User Guide > 3 Command Reference

NextPrevUpTopContentsIndex

3.16 Transposition

This section gives details of commands used to transpose characters, words, lines and regions.

Transpose Characters

Editor Command

Arguments: None
Key sequence: Ctrl+T

Transposes the current character with the previous character, and then moves the current point forwards one character.

If this command is issued when the current point is at the end of a line, the two characters to the left of the cursor are transposed.

A positive prefix argument causes the character before the current point to be shifted forwards the required number of places. A negative prefix argument has a similar effect but shifts the character backwards. In both cases the current point remains located after the character which has been moved.

Transpose Words

Editor Command

Arguments: None
Key sequence: Alt+T

Transposes the current word with the next word, and then moves the current point forward one word. If the current point is initially located between two words, then the previous word is moved over the next word.

A positive prefix argument causes the current or previous word to be shifted forwards the required number of words. A negative prefix argument has a similar effect but shifts the word backwards. In both cases the current point remains located after the word which has been moved.

Transpose Lines

Editor Command

Arguments: None
Key sequence: Ctrl+X Ctrl+T

Transposes the current line with the previous line, and then moves the current point forward one line.

A positive prefix argument causes the previous line to be shifted forwards the required number of lines. A negative prefix argument has a similar effect but shifts the line backwards. In both cases the current point remains located after the line which has been moved.

A prefix argument of zero transposes the current line and the line containing the mark.

Transpose Regions

Editor Command

Arguments: None
Key sequence: None

Transposes two regions. One region is delineated by the current point and the mark. The other region is delineated by the next two points on the mark ring. To use this command it is necessary to use Set Mark at the beginning and end of one region and at the beginning of the other region, and then move the current point to the end of the second region.


LispWorks Editor User Guide (Windows version) - 9 Dec 2014

NextPrevUpTopContentsIndex