docs(api): fix wrong documentation of nvim_create_autocmd (#17870)

also add doc changes from typofix PR
This commit is contained in:
かわえもん
2022-03-26 21:21:32 +09:00
committed by GitHub
parent fb5587d2be
commit 85821d8b6f
2 changed files with 12 additions and 16 deletions

View File

@@ -340,8 +340,7 @@ cleanup:
/// -- Vimscript function name (as a string)
/// local myvimfun = "g:MyVimFunction"
///
/// vim.api.nvim_create_autocmd({
/// event = {"BufEnter", "BufWinEnter"},
/// vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
/// pattern = {"*.c", "*.h"},
/// callback = myluafun, -- Or myvimfun
/// })
@@ -349,8 +348,7 @@ cleanup:
///
/// Example using command:
/// <pre>
/// vim.api.nvim_create_autocmd({
/// event = {"BufEnter", "BufWinEnter"},
/// vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
/// pattern = {"*.c", "*.h"},
/// command = "echo 'Entering a C or C++ file'",
/// })
@@ -364,8 +362,8 @@ cleanup:
///
/// Examples values for event:
/// <pre>
/// event = "BufPreWrite"
/// event = {"CursorHold", "BufPreWrite", "BufPostWrite"}
/// "BufPreWrite"
/// {"CursorHold", "BufPreWrite", "BufPostWrite"}
/// </pre>
///
/// @param event (String|Array) The event or events to register this autocommand