From 5fd03508aab15f2c94bbc1a5098fa3d3d62ae3e1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 2 Jun 2025 08:26:34 +0800 Subject: [PATCH] vim-patch:95ea0b0: runtime(doc): make 'shiftwidth' setting more precise (#34266) closes: vim/vim#17414 https://github.com/vim/vim/commit/95ea0b0f8de4ab6e13bf090f33b8cbfe5b6e5c9f Co-authored-by: Damien Lejay --- runtime/doc/options.txt | 8 ++++---- runtime/lua/vim/_meta/options.lua | 8 ++++---- src/nvim/options.lua | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e6652bb83e..80ac6364cf 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5503,10 +5503,10 @@ A jump table for the options with a short description can be found at |Q_op|. *'shiftwidth'* *'sw'* 'shiftwidth' 'sw' number (default 8) local to buffer - Number of spaces to use for each step of (auto)indent. Used for - |'cindent'|, |>>|, |<<|, etc. - When zero the 'tabstop' value will be used. Use the |shiftwidth()| - function to get the effective shiftwidth value. + Number of columns that make up one level of (auto)indentation. Used + by |'cindent'|, |<<|, |>>|, etc. + If set to 0, Vim uses the current 'tabstop' value. Use |shiftwidth()| + to obtain the effective value in scripts. *'shortmess'* *'shm'* *E1336* 'shortmess' 'shm' string (default "ltToOCF") diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index aa6e7b94de..7c853571dd 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -5822,10 +5822,10 @@ vim.o.sr = vim.o.shiftround vim.go.shiftround = vim.o.shiftround vim.go.sr = vim.go.shiftround ---- Number of spaces to use for each step of (auto)indent. Used for ---- `'cindent'`, `>>`, `<<`, etc. ---- When zero the 'tabstop' value will be used. Use the `shiftwidth()` ---- function to get the effective shiftwidth value. +--- Number of columns that make up one level of (auto)indentation. Used +--- by `'cindent'`, `<<`, `>>`, etc. +--- If set to 0, Vim uses the current 'tabstop' value. Use `shiftwidth()` +--- to obtain the effective value in scripts. --- --- @type integer vim.o.shiftwidth = 8 diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 549492555a..6ba29361b9 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -7760,10 +7760,10 @@ local options = { cb = 'did_set_shiftwidth_tabstop', defaults = 8, desc = [=[ - Number of spaces to use for each step of (auto)indent. Used for - |'cindent'|, |>>|, |<<|, etc. - When zero the 'tabstop' value will be used. Use the |shiftwidth()| - function to get the effective shiftwidth value. + Number of columns that make up one level of (auto)indentation. Used + by |'cindent'|, |<<|, |>>|, etc. + If set to 0, Vim uses the current 'tabstop' value. Use |shiftwidth()| + to obtain the effective value in scripts. ]=], full_name = 'shiftwidth', scope = { 'buf' },