mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
docs(lua): clarify when vim.bo
/vim.wo
acts like :setlocal
(#27708)
This commit is contained in:

committed by
GitHub

parent
181b620580
commit
3df1211ebc
@@ -271,10 +271,10 @@ vim.go = setmetatable({}, {
|
||||
})
|
||||
|
||||
--- Get or set buffer-scoped |options| for the buffer with number {bufnr}.
|
||||
--- Like `:set` and `:setlocal`. If [{bufnr}] is omitted then the current
|
||||
--- buffer is used. Invalid {bufnr} or key is an error.
|
||||
--- If [{bufnr}] is omitted then the current buffer is used.
|
||||
--- Invalid {bufnr} or key is an error.
|
||||
---
|
||||
--- Note: this is equivalent to both `:set` and `:setlocal`.
|
||||
--- Note: this is equivalent to `:setlocal` for |global-local| options and `:set` otherwise.
|
||||
---
|
||||
--- Example:
|
||||
---
|
||||
@@ -287,9 +287,9 @@ vim.go = setmetatable({}, {
|
||||
vim.bo = new_buf_opt_accessor()
|
||||
|
||||
--- Get or set window-scoped |options| for the window with handle {winid} and
|
||||
--- buffer with number {bufnr}. Like `:setlocal` if {bufnr} is provided, like
|
||||
--- `:set` otherwise. If [{winid}] is omitted then the current window is
|
||||
--- used. Invalid {winid}, {bufnr} or key is an error.
|
||||
--- buffer with number {bufnr}. Like `:setlocal` if setting a |global-local| option
|
||||
--- or if {bufnr} is provided, like `:set` otherwise. If [{winid}] is omitted then
|
||||
--- the current window is used. Invalid {winid}, {bufnr} or key is an error.
|
||||
---
|
||||
--- Note: only {bufnr} with value `0` (the current buffer in the window) is
|
||||
--- supported.
|
||||
|
Reference in New Issue
Block a user