aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/api.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r--runtime/doc/api.txt32
1 files changed, 30 insertions, 2 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 0a8a3e9a2c..2b9aef2d77 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -2453,9 +2453,9 @@ nvim_buf_get_extmarks({buffer}, {ns_id}, {start}, {end}, {opts})
local pos = a.nvim_win_get_cursor(0)
local ns = a.nvim_create_namespace('my-plugin')
-- Create new extmark at line 1, column 1.
- local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, 0, {})
+ local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, {})
-- Create new extmark at line 3, column 1.
- local m2 = a.nvim_buf_set_extmark(0, ns, 0, 2, 0, {})
+ local m2 = a.nvim_buf_set_extmark(0, ns, 0, 2, {})
-- Get extmarks only from line 3.
local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {})
-- Get all marks in this buffer + namespace.
@@ -3151,6 +3151,34 @@ nvim_tabpage_set_var({tabpage}, {name}, {value})
==============================================================================
Autocmd Functions *api-autocmd*
+nvim_clear_autocmd({*opts}) *nvim_clear_autocmd()*
+ Clear all autocommands that match the corresponding {opts}. To
+ delete a particular autocmd, see |nvim_del_autocmd|.
+
+ Parameters: ~
+ {opts} Parameters
+ • event: (string|table) Examples:
+ • event: "pat1"
+ • event: { "pat1" }
+ • event: { "pat1", "pat2", "pat3" }
+
+ • pattern: (string|table)
+ • pattern or patterns to match exactly.
+ • For example, if you have `*.py` as that
+ pattern for the autocmd, you must pass
+ `*.py` exactly to clear it. `test.py` will
+ not match the pattern.
+
+ • defaults to clearing all patterns.
+ • NOTE: Cannot be used with {buffer}
+
+ • buffer: (bufnr)
+ • clear only |autocmd-buflocal| autocommands.
+ • NOTE: Cannot be used with {pattern}
+
+ • group: (string|int) The augroup name or id.
+ • NOTE: If not passed, will only delete autocmds not in any group.
+
nvim_create_augroup({name}, {*opts}) *nvim_create_augroup()*
Create or get an autocommand group |autocmd-groups|.