[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/visual-fill-column 8d1326de10 090/137: Update the README.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/visual-fill-column 8d1326de10 090/137: Update the README. |
Date: |
Sun, 2 Jan 2022 22:59:14 -0500 (EST) |
branch: elpa/visual-fill-column
commit 8d1326de102b0488ebfe906cbf4370ea5f77a2ba
Author: Joost Kremers <joostkremers@fastmail.fm>
Commit: Joost Kremers <joostkremers@fastmail.fm>
Update the README.
---
README.md | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index 701aa0db35..e03f52286a 100644
--- a/README.md
+++ b/README.md
@@ -12,23 +12,23 @@
`visual-fill-column` can be installed via [Melpa](http://melpa.org).
-## Activation ##
+## Usage ##
`visual-fill-column-mode` is primarily intended to be used alongside
`visual-line-mode`. If this is your desired use-case , the way to activate
`visual-fill-column-mode` depends on how you activate `visual-line-mode`.
-If you activate `visual-line-mode` by using `global-visual-line-mode`, you can
use `global-visual-fill-column-mode` (either set the user option through
Customize, or call it as a function in your init file).
`global-visual-fill-column-mode` turns on `visual-fill-column-mode` in every
buffer that uses `visual-line-mode`, but only if this buffer is visiting a file.
+If you activate `visual-line-mode` by using `global-visual-line-mode`, you can
use `global-visual-fill-column-mode` (either set the user option through
Customize, or call it as a function in your init file).
`global-visual-fill-column-mode` turns on `visual-fill-column-mode` in every
buffer that is visiting a file. (In buffers that do not visit any file,
`visual-fill-column-mode` is mostly useless and sometimes even disruptive.)
-`visual-fill-column-mode` can also be turned on in hooks. For example, if you
don't use `global-visual-line-mode` but still prefer to activate
`visual-fill-column-mode` in every buffer that uses `visual-line-mode`, you can
add `visual-fill-column-mode` to `visual-line-mode-hook`:
+`visual-fill-column-mode` can also be turned on in hooks. For example, if you
don't use `global-visual-line-mode`, but would like to activate
`visual-fill-column-mode` in every buffer that uses `visual-line-mode`, you can
add `visual-fill-column-mode` to `visual-line-mode-hook`:
(add-hook 'visual-line-mode-hook #'visual-fill-column-mode)
-Both these methods have the effect that `visual-fill-column-mode` is used in
every buffer that uses `visual-line-mode`. If that's not what you want, you can
also use the reverse method: add `visual-line-mode` to
`visual-fill-column-mode-hook`:
+This method has the effect that `visual-fill-column-mode` is used in every
buffer that uses `visual-line-mode`. If that's not what you want, you can also
use the reverse method: add `visual-line-mode` to
`visual-fill-column-mode-hook`:
(add-hook 'visual-fill-column-mode-hook #'visual-line-mode)
This way, whenever you activate `visual-fill-column-mode` (e.g., interactively
with `M-x visual-fill-column-mode` or in a major mode hook), `visual-line-mode`
is also activated, but you can still activate `visual-line-mode` without using
`visual-fill-column-mode`.
-Note that `visual-fill-column-mode` is not tied to `visual-line-mode`: it is
perfectly possible to use it on its own.
+Note that while `visual-fill-column-mode` was written with the purpose of
wrapping text in buffers using `visual-line-mode`, it is not tied to
`visual-line-mode`: it is perfectly possible to use `visual-fill-column-mode`
on its own.
`visual-fill-column-mode` works by widening the right window margin. This
reduces the area that is available for text display, creating the appearance
that the text is wrapped at `fill-column`. The amount by which the right margin
is widened depends on the window width and is automatically adjusted when the
window’s width changes (e.g., when the window is split in two side-by-side
windows).
@@ -39,7 +39,7 @@ Widening the margin normally causes the fringes to be pushed
inward. Since this
## Splitting a Window ##
-Emacs won’t vertically split a window (i.e., into two side-by-side windows)
that has wide margins. As a result, displaying buffers such as `*Help*`
buffers, `*Completion*` buffers, etc., won’t split a window vertically, even if
there appears to be enough space for a vertical split. This is not problematic,
but it may be undesirable. To remedy this, you can set the option
`split-window-preferred-function` to
`visual-fill-column-split-window-sensibly`. This function first unsets the
margin [...]
+Emacs won’t vertically split a window (i.e., into two side-by-side windows)
that has wide margins. As a result, displaying buffers such as `*Help*`
buffers, `*Completion*` buffers, etc., won’t split a window vertically, even if
there appears to be enough space for a vertical split. This is technically not
problematic, but it may be undesirable from a user's point of view. To remedy
this, you can set the option `split-window-preferred-function` to
`visual-fill-column-split-window-sensibly [...]
(setq-default split-window-preferred-function
'visual-fill-column-split-window-sensibly)
@@ -48,12 +48,14 @@ Emacs won’t vertically split a window (i.e., into two
side-by-side windows) th
The width of the margins is adjusted for the text size: larger text size means
smaller margins. However, interactive adjustments to the text size (e.g., with
`text-size-adjust`) cannot be detected by `visual-fill-column-mode`, therefore
if you adjust the text size while `visual-fill-column-mode` is active, the
margins won't be adjusted. To remedy this, you can force a redisplay, e.g., by
switching buffers, by splitting and unsplitting the window or by calling
`redraw-display`.
-Alternatively, you can advise the function `text-size-adjust` (or whatever
function you use to adjust the text size) with the function
`visual-fill-column-adjust`:
+Alternatively, you can advise the function `text-size-adjust` with the
function `visual-fill-column-adjust`:
(advice-add 'text-scale-adjust :after #'visual-fill-column-adjust)
-## Options ##
+## Customisation ##
+
+The customisation group `visual-fill-column` has three options (beside
`global-visual-fill-column-mode`) that can be used to customise
`visual-fill-column`:
`visual-fill-column-width`: column at which to wrap lines. If set to `nil`
(the default), use the value of `fill-column` instead.
@@ -61,4 +63,5 @@ Alternatively, you can advise the function `text-size-adjust`
(or whatever funct
`visual-fill-column-fringes-outside-margins`: if set to `t`, put the fringes
outside the margins.
-All three options are buffer-local, so the values you set through Customize
are default values. They can also be set in mode hooks or directory or file
local variables in order to customise particular files or file types.
+All three options are buffer-local, so the values you set in your init file
are default values. They can also be set in mode hooks or directory or file
local variables in order to customise particular files or file types.
+
- [nongnu] elpa/visual-fill-column b63174ec24 006/137: Update README, (continued)
- [nongnu] elpa/visual-fill-column b63174ec24 006/137: Update README, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column d3ebba9e60 009/137: Update version number in header block., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 7bf332089a 012/137: Fix typo., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 261e27c062 024/137: Update version number to 1.5, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 043485d16a 026/137: Rename ::window-body-width to ::window-max-text-width, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 96ac324638 031/137: Remove spurious empty line., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 4329831dd0 030/137: Add alternative function for `split-window-preferred-function'., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 9cae9dbfd9 041/137: Set window-parameter `split-window' only in Emacs 25 and up., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 98438fa2b8 048/137: Update version number., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 57c2a72d46 053/137: Merge pull request #26 from sten0/master, ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 8d1326de10 090/137: Update the README.,
ELPA Syncer <=
- [nongnu] elpa/visual-fill-column 6e9f35600d 099/137: Remove spurious line from `visual-fill-column--reset-window'., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column a5332e9625 103/137: Update the README., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column f7c0aab5c6 102/137: Splitting windows: get things right., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 4c86aebd2b 097/137: Make the argument of visual-fill-column--adjust-window optional., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 99d78162d9 107/137: Add `visual-fill-column-offset`., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 39cb7ab53d 118/137: Unconditionally clear `window-configuration-change-hook`., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 21eda77a66 123/137: Remove `visual-fill-column--adjust-all-windows`., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column d55e95c109 132/137: visual-fill-column.el: Update Commentary section., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column 6b7d8780f1 119/137: Use proper hooks according to Emacs version., ELPA Syncer, 2022/01/02
- [nongnu] elpa/visual-fill-column ae4edc225a 136/137: Fix alignment in doc string of visual-fill-column--add-extra-width, ELPA Syncer, 2022/01/02