From 038fb30ece791f403c298632ca40b83f79687bf8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 5 Jun 2025 06:28:16 +0800 Subject: vim-patch:d6c9ac9: runtime(doc): clarify the effect of 'smarttab' closes: vim/vim#17426 https://github.com/vim/vim/commit/d6c9ac97a009f7099b7d3636548aa3a4fabb5f1a Co-authored-by: Damien Lejay --- runtime/lua/vim/_meta/options.lua | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 957e8f9438..368b254610 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -6168,16 +6168,11 @@ vim.o.si = vim.o.smartindent vim.bo.smartindent = vim.o.smartindent vim.bo.si = vim.bo.smartindent ---- When on, a in front of a line inserts blanks according to ---- 'shiftwidth'. 'tabstop' or 'softtabstop' is used in other places. A ---- will delete a 'shiftwidth' worth of space at the start of the ---- line. ---- When off, a always inserts blanks according to 'tabstop' or ---- 'softtabstop'. 'shiftwidth' is only used for shifting text left or ---- right `shift-left-right`. ---- What gets inserted (a or spaces) depends on the 'expandtab' ---- option. Also see `ins-expandtab`. When 'expandtab' is not set, the ---- number of spaces is minimized by using s. +--- When enabled, the key will indent by 'shiftwidth' if the cursor +--- is in leading whitespace. The key has the opposite effect. +--- This behaves as if 'softtabstop' is set to the value of 'shiftwidth'. +--- Have a look at section `30.5` of the user guide for detailed +--- explanations on how Vim works with tabs and spaces. --- --- @type boolean vim.o.smarttab = true -- cgit