mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
docs(lua): "vim.bo" is always equivalent to :setlocal (#30733)
vim.bo
:lua vim.bo.textwidth = 80
:setglobal textwidth?
textwidth=0
:setlocal
:setlocal textwidth=80
:setglobal textwidth?
textwidth=0
:set
:set textwidth=80
:setglobal textwidth?
textwidth=80
(cherry picked from commit 8ef3dd3afa
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
c257fe5582
commit
5480c0bd75
@@ -1426,12 +1426,9 @@ Option:remove({value}) *vim.opt:remove()*
|
||||
• {value} (`string`) Value to remove
|
||||
|
||||
vim.bo[{bufnr}] *vim.bo*
|
||||
Get or set buffer-scoped |options| for the buffer with number {bufnr}. If
|
||||
{bufnr} is omitted then the current buffer is used. Invalid {bufnr} or key
|
||||
is an error.
|
||||
|
||||
Note: this is equivalent to `:setlocal` for |global-local| options and
|
||||
`:set` otherwise.
|
||||
Get or set buffer-scoped |options| for the buffer with number {bufnr}.
|
||||
Like `:setlocal`. If {bufnr} is omitted then the current buffer is used.
|
||||
Invalid {bufnr} or key is an error.
|
||||
|
||||
Example: >lua
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
|
@@ -276,11 +276,9 @@ vim.go = setmetatable({}, {
|
||||
})
|
||||
|
||||
--- Get or set buffer-scoped |options| for the buffer with number {bufnr}.
|
||||
--- If {bufnr} is omitted then the current buffer is used.
|
||||
--- Like `:setlocal`. If {bufnr} is omitted then the current buffer is used.
|
||||
--- Invalid {bufnr} or key is an error.
|
||||
---
|
||||
--- Note: this is equivalent to `:setlocal` for |global-local| options and `:set` otherwise.
|
||||
---
|
||||
--- Example:
|
||||
---
|
||||
--- ```lua
|
||||
|
Reference in New Issue
Block a user