aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-07-31 19:30:16 +0000
committerChong Yidong2008-07-31 19:30:16 +0000
commit458db4b65af29d2b08a27d230f3bff0b770cf5e4 (patch)
tree95de4ce184ba00c36fce92173fc6cf7d33f6dc37
parent5dd3307831450a85e96175c099f294199125d2ff (diff)
downloademacs-458db4b65af29d2b08a27d230f3bff0b770cf5e4.tar.gz
emacs-458db4b65af29d2b08a27d230f3bff0b770cf5e4.zip
(Visual Line Mode): New node.
-rw-r--r--doc/emacs/display.texi45
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
1172newline overflows into the right fringe, and the cursor appears in the 1173newline overflows into the right fringe, and the cursor appears in the
1173fringe when positioned on that newline. 1174fringe 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
1182more screen lines, like in ordinary line continuation. However, Emacs
1183attempts to wrap the line at word boundaries near the right window
1184edge. This makes the text easier to read, as wrapping does not occur
1185in 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.
1191To turn on Visual Line mode in the current buffer, type @kbd{M-x
1192visual-line-mode}; repeating this command turns it off. You can also
1193turn on Visual Line mode using the menu bar: in the Options menu,
1194select the @samp{Line Wrapping in this Buffer} submenu, followed by
1195the @samp{Word Wrap (Visual Line Mode)} menu item. While Visual Line
1196mode is enabled, the mode-line shows the string @samp{wrap} in the
1197mode display. The command @kbd{M-x global-visual-line-mode} toggles
1198Visual 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
1205instead of logical lines: @kbd{C-a} (@code{beginning-of-visual-line})
1206moves 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
1209screen 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
1212previous logical line respectively.
1213
1214 By default, word-wrapped lines do not display fringe indicators.
1215Visual Line mode is often used to edit files that contain many long
1216logical lines, so having a fringe indicator for each wrapped line
1217would be visually distracting. You can change this by customizing the
1218variable @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