diff options
| author | Chong Yidong | 2008-07-31 19:30:16 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-07-31 19:30:16 +0000 |
| commit | 458db4b65af29d2b08a27d230f3bff0b770cf5e4 (patch) | |
| tree | 95de4ce184ba00c36fce92173fc6cf7d33f6dc37 | |
| parent | 5dd3307831450a85e96175c099f294199125d2ff (diff) | |
| download | emacs-458db4b65af29d2b08a27d230f3bff0b770cf5e4.tar.gz emacs-458db4b65af29d2b08a27d230f3bff0b770cf5e4.zip | |
(Visual Line Mode): New node.
| -rw-r--r-- | doc/emacs/display.texi | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index cab75796692..fdeeda2e617 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -31,6 +31,7 @@ their values only make a difference at the time of redisplay. | |||
| 31 | * Cursor Display:: Features for displaying the cursor. | 31 | * Cursor Display:: Features for displaying the cursor. |
| 32 | * Line Truncation:: Truncating lines to fit the screen width instead | 32 | * Line Truncation:: Truncating lines to fit the screen width instead |
| 33 | of continuing them to multiple screen lines. | 33 | of continuing them to multiple screen lines. |
| 34 | * Visual Line Mode:: Word wrap and screen line-based editing. | ||
| 34 | * Temporary Face Changes:: Commands to temporarily modify the default text face | 35 | * Temporary Face Changes:: Commands to temporarily modify the default text face |
| 35 | * Display Custom:: Information on variables for customizing display. | 36 | * Display Custom:: Information on variables for customizing display. |
| 36 | @end menu | 37 | @end menu |
| @@ -1172,6 +1173,50 @@ truncate a line which is exactly as wide as the window. Instead, the | |||
| 1172 | newline overflows into the right fringe, and the cursor appears in the | 1173 | newline overflows into the right fringe, and the cursor appears in the |
| 1173 | fringe when positioned on that newline. | 1174 | fringe when positioned on that newline. |
| 1174 | 1175 | ||
| 1176 | @node Visual Line Mode | ||
| 1177 | @section Visual Line Mode | ||
| 1178 | |||
| 1179 | @cindex word wrap | ||
| 1180 | Another alternative to ordinary line continuation is to use | ||
| 1181 | @dfn{word wrap}. Here, each long logical line is divided into two or | ||
| 1182 | more screen lines, like in ordinary line continuation. However, Emacs | ||
| 1183 | attempts to wrap the line at word boundaries near the right window | ||
| 1184 | edge. This makes the text easier to read, as wrapping does not occur | ||
| 1185 | in the middle of words. | ||
| 1186 | |||
| 1187 | @cindex Visual Line mode | ||
| 1188 | @findex visual-line-mode | ||
| 1189 | @findex global-visual-line-mode | ||
| 1190 | Word wrap is enabled by Visual Line mode, an optional minor mode. | ||
| 1191 | To turn on Visual Line mode in the current buffer, type @kbd{M-x | ||
| 1192 | visual-line-mode}; repeating this command turns it off. You can also | ||
| 1193 | turn on Visual Line mode using the menu bar: in the Options menu, | ||
| 1194 | select the @samp{Line Wrapping in this Buffer} submenu, followed by | ||
| 1195 | the @samp{Word Wrap (Visual Line Mode)} menu item. While Visual Line | ||
| 1196 | mode is enabled, the mode-line shows the string @samp{wrap} in the | ||
| 1197 | mode display. The command @kbd{M-x global-visual-line-mode} toggles | ||
| 1198 | Visual Line mode in all buffers. | ||
| 1199 | |||
| 1200 | @findex beginning-of-visual-line | ||
| 1201 | @findex end-of-visual-line | ||
| 1202 | @findex next-logical-line | ||
| 1203 | @findex previous-logical-line | ||
| 1204 | In Visual Line mode, some editing commands work on screen lines | ||
| 1205 | instead of logical lines: @kbd{C-a} (@code{beginning-of-visual-line}) | ||
| 1206 | moves to the beginning of the screen line, @kbd{C-e} | ||
| 1207 | (@code{end-of-visual-line}) moves to the end of the screen line, and | ||
| 1208 | @kbd{C-k} (@code{kill-visual-line}) kills text to the end of the | ||
| 1209 | screen line. Furthermore, the commands @kbd{M-]} | ||
| 1210 | (@code{next-logical-line}) and @kbd{M-[} | ||
| 1211 | (@code{previous-logical-line}) move point to the next logical line and | ||
| 1212 | previous logical line respectively. | ||
| 1213 | |||
| 1214 | By default, word-wrapped lines do not display fringe indicators. | ||
| 1215 | Visual Line mode is often used to edit files that contain many long | ||
| 1216 | logical lines, so having a fringe indicator for each wrapped line | ||
| 1217 | would be visually distracting. You can change this by customizing the | ||
| 1218 | variable @code{visual-line-fringe-indicators}. | ||
| 1219 | |||
| 1175 | @node Temporary Face Changes | 1220 | @node Temporary Face Changes |
| 1176 | @section Temporary Face Changes | 1221 | @section Temporary Face Changes |
| 1177 | 1222 | ||