docs: example keybind for :Inspect #31391

This commit is contained in:
C.D. MacEachern
2024-12-01 16:58:28 -05:00
committed by GitHub
parent ab9cfc4dc3
commit feb62d5429
2 changed files with 12 additions and 0 deletions

View File

@@ -1911,6 +1911,11 @@ vim.show_pos({bufnr}, {row}, {col}, {filter}) *vim.show_pos()*
Can also be shown with `:Inspect`. *:Inspect*
Example: To bind this function to the vim-scriptease inspired `zS` in
Normal mode: >lua
vim.keymap.set('n', 'zS', vim.show_pos)
<
Attributes: ~
Since: 0.9.0

View File

@@ -146,6 +146,13 @@ end
---
---Can also be shown with `:Inspect`. [:Inspect]()
---
---Example: To bind this function to the vim-scriptease
---inspired `zS` in Normal mode:
---
---```lua
---vim.keymap.set('n', 'zS', vim.show_pos)
---```
---
---@since 11
---@param bufnr? integer defaults to the current buffer
---@param row? integer row to inspect, 0-based. Defaults to the row of the current cursor