From 1aaad90f4f7bb83ddf756e55fe817f74d087b0ab Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Thu, 18 Feb 2021 17:52:50 -0800 Subject: [PATCH] fix(editor/#3149): Change word wrap configuration default to be on (#3161) __Issue:__ Both Vim & VSCode default to having word-wrap (soft wrap) enabled, but Onivim defaults to having it off. There isn't a reason to be different from both of their default settings. __Fix:__ Change word-wrap (soft wrap) to be on by default. Fixes #3149 --- CHANGES_CURRENT.md | 1 + docs/docs/configuration/settings.md | 2 +- src/Feature/Editor/EditorConfiguration.re | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES_CURRENT.md b/CHANGES_CURRENT.md index 1d20ef7548..7459d42d3b 100644 --- a/CHANGES_CURRENT.md +++ b/CHANGES_CURRENT.md @@ -8,6 +8,7 @@ - #3147 - Editor: Fix minimap scroll synchronization for large files - #3077 - Terminal: Use editor font as default (related #3062) - #3146 - Vim: Fix command-line staying open when clicking the editor or file explorer (fixes #3031) +- #3161 - Configuration: Turn soft word-wrap on by default (fixes #3161) ### Performance diff --git a/docs/docs/configuration/settings.md b/docs/docs/configuration/settings.md index 9ce48dbfed..1cdfb628ed 100644 --- a/docs/docs/configuration/settings.md +++ b/docs/docs/configuration/settings.md @@ -96,7 +96,7 @@ The configuration file, `configuration.json` is in the Oni2 directory, whose loc - `editor.wordBasedSuggestions` __(_bool_ default: `true`)__ When `true`, keywords are provided as completion suggestions. -- `editor.wordWrap` __(_bool_ default: `false`)__ When `true`, Onivim will soft-wrap lines at the viewport boundary. +- `editor.wordWrap` __(_bool_ default: `true`)__ When `true`, Onivim will soft-wrap lines at the viewport boundary. - `editor.rulers` __(_list of int_ default: `[]`)__ - Render vertical rulers at given columns. diff --git a/src/Feature/Editor/EditorConfiguration.re b/src/Feature/Editor/EditorConfiguration.re index 4a7d960b99..aebfd0b99f 100644 --- a/src/Feature/Editor/EditorConfiguration.re +++ b/src/Feature/Editor/EditorConfiguration.re @@ -310,7 +310,7 @@ let smoothScroll = let tabSize = setting("editor.tabSize", int, ~default=4); let wordWrap = - setting("editor.wordWrap", ~vim=VimSettings.wrap, wordWrap, ~default=`Off); + setting("editor.wordWrap", ~vim=VimSettings.wrap, wordWrap, ~default=`On); let wordWrapColumn = setting("editor.wordWrapColumn", int, ~default=80);