diff options
Diffstat (limited to 'runtime/lua/vim/snippet.lua')
-rw-r--r-- | runtime/lua/vim/snippet.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/lua/vim/snippet.lua b/runtime/lua/vim/snippet.lua index 8fe03b3882..3d8f73f362 100644 --- a/runtime/lua/vim/snippet.lua +++ b/runtime/lua/vim/snippet.lua @@ -532,14 +532,13 @@ end --- @alias vim.snippet.Direction -1 | 1 ---- Jumps within the active snippet in the given direction. ---- If the jump isn't possible, the function call does nothing. +--- Jumps to the next (or previous) placeholder in the current snippet, if possible. --- ---- You can use this function to navigate a snippet as follows: +--- For example, map `<Tab>` to jump while a snippet is active: --- --- ```lua --- vim.keymap.set({ 'i', 's' }, '<Tab>', function() ---- if vim.snippet.jumpable(1) then +--- if vim.snippet.active({ direction = 1 }) then --- return '<cmd>lua vim.snippet.jump(1)<cr>' --- else --- return '<Tab>' |