aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-09-09 00:04:39 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-09-09 00:04:39 -0400
commit3736a613e8ccbb4ed38f24399e9a368112216d69 (patch)
tree9ef8bfd5c9a575ebfe9eba5367585862742993fd
parent9468e538694cd16847586c66de6e16ee7a090577 (diff)
downloadrneovim-3736a613e8ccbb4ed38f24399e9a368112216d69.tar.gz
rneovim-3736a613e8ccbb4ed38f24399e9a368112216d69.tar.bz2
rneovim-3736a613e8ccbb4ed38f24399e9a368112216d69.zip
doc: 'encoding'
-rw-r--r--runtime/doc/mbyte.txt4
-rw-r--r--runtime/doc/message.txt4
-rw-r--r--runtime/doc/options.txt15
3 files changed, 10 insertions, 13 deletions
diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt
index 9086e69959..c959c12fb4 100644
--- a/runtime/doc/mbyte.txt
+++ b/runtime/doc/mbyte.txt
@@ -89,8 +89,8 @@ See |encoding-values| for a list of acceptable values.
The result is that all the text that is used inside Vim will be in this
encoding. Not only the text in the buffers, but also in registers, variables,
-etc. 'encoding' cannot be changed after startup (at latest when |vimrc|
-is sourced) as changing the value later would make the existing text invalid.
+etc. 'encoding' is read-only after startup because changing it would make the
+existing text invalid.
You can edit files in another encoding than what 'encoding' is set to. Vim
will convert the file when you read it and convert it back when you write it.
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index 91e1a97659..a17eee4976 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -742,8 +742,8 @@ a user-defined command.
*E905* >
Cannot set this option after startup
-This option might only be changed in a |vimrc| file (or earlier). This means
-that plugins can rely on the value being constant after initialization.
+You tried to set an option after startup that only allows changes during
+startup.
==============================================================================
3. Messages *messages*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 73dbca9c7a..13e01a8e3f 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2217,13 +2217,10 @@ A jump table for the options with a short description can be found at |Q_op|.
viminfo file, etc. It sets the kind of characters which Vim can work
with. See |encoding-names| for the possible values.
- This option cannot be changed after startup.
- Otherwise it would cause non-ASCII text inside Vim to become
- invalid. It should normally be kept at its default value, or be set
- in vimrc. See |multibyte|.
-
- The recommended 'encoding' is "utf-8". Remote plugins and GUI:s
- only support utf-8.
+ 'encoding' cannot be changed after startup, because (1) it causes
+ non-ASCII text inside Vim to become invalid, and (2) it complicates
+ runtime logic. The recommended 'encoding' is "utf-8". Remote plugins
+ and GUIs only support utf-8. See |multibyte|.
The character encoding of files can be different from 'encoding'.
This is specified with 'fileencoding'. The conversion is done with
@@ -2234,8 +2231,8 @@ A jump table for the options with a short description can be found at |Q_op|.
if has("multi_byte_encoding")
<
Normally 'encoding' will be equal to your current locale. This will
- be the default if Vim recognizes your environment settings.
- "utf-8" is used when the locale encoding could not be detected.
+ be the default if Vim recognizes your environment settings, otherwise
+ "utf-8" is used.
When you set this option, it fires the |EncodingChanged| autocommand
event so that you can set up fonts if necessary.