mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +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
This commit is contained in:
@ -1464,12 +1464,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()
|
||||
|
@ -274,11 +274,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