aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/options.txt24
-rw-r--r--src/nvim/options.lua2
2 files changed, 14 insertions, 12 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 0b7c61ea18..a63bef5622 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2690,17 +2690,19 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons.
*'fsync'* *'fs'*
-'fsync' 'fs' boolean (default on)
- global
- When on, the library function fsync() will be called after writing a
- file. This will flush a file to disk, ensuring that it is safely
- written even on filesystems which do metadata-only journaling. This
- will force the harddrive to spin up on Linux systems running in laptop
- mode, so it may be undesirable in some situations. Be warned that
- turning this off increases the chances of data loss after a crash.
-
- Currently applies only to writing the buffer with e.g. |:w| and
- |writefile()|.
+'fsync' 'fs' boolean (default off)
+ global
+ When on, the OS function fsync() will be called after saving a file
+ (|:write|, |writefile()|, …), |swap-file| and |shada-file|. This
+ flushes the file to disk, ensuring that it is safely written.
+ Slow on some systems: writing buffers, quitting Nvim, and other
+ operations may sometimes take a few seconds.
+
+ Files are ALWAYS flushed ('fsync' is ignored) when:
+ - |CursorHold| event is triggered
+ - |:preserve| is called
+ - system signals low battery life
+ - Nvim exits abnormally
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
'gdefault' 'gd' boolean (default off)
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index 80484d0ad2..66018b2475 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -976,7 +976,7 @@ return {
secure=true,
vi_def=true,
varname='p_fs',
- defaults={if_true={vi=true}}
+ defaults={if_true={vi=false}}
},
{
full_name='gdefault', abbreviation='gd',