From 4484afbca5c855c75b86fcd148e8fca60decf831 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Fri, 30 Jun 2023 16:30:44 +0200 Subject: [PATCH] config: set changes preview - Sets the `inccommand` option to `nosplit` to preview the changes before accepting them with the substitute command. - Removes unused configuration. Co-Authored-by: iGor milhit --- init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 69aa5f3..0b0993d 100644 --- a/init.lua +++ b/init.lua @@ -237,6 +237,10 @@ vim.opt.rtp:append (vim.fn.stdpath ('data') .. '/site') -- Set highlight on search vim.o.hlsearch = true +-- Preview changes when searching and substituing +-- nosplit avoid to display the preview in a separate split +vim.o.inccommand = "nosplit" + -- Make line numbers default vim.wo.number = true @@ -245,10 +249,6 @@ vim.opt.textwidth = 79 -- Display the cusor column at 79+1 column vim.opt.colorcolumn:append('+1') --- Set text formatting options --- 'a' is for autoformat --- vim.opt.formatoptions:append('a') - -- Enable mouse mode vim.o.mouse = 'a'