commit 57b4fb5c5318394b82508492232d6e926ef8f23f
parent 4dabeff308222307ede8e74a2bd341713a7f7d81
Author: Ghjuvan Lacambre <lacambre@adacore.com>
Date: Mon, 31 Mar 2025 15:22:21 +0200
fix(defaults): enable :terminal [[,]] motion in operator-pending mode #33217
This enables y]] to copy a command and its output.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/runtime/lua/vim/_defaults.lua b/runtime/lua/vim/_defaults.lua
@@ -622,10 +622,10 @@ do
end
vim.wo[0][0].winhighlight = winhl .. 'StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC'
- vim.keymap.set({ 'n', 'x' }, '[[', function()
+ vim.keymap.set({ 'n', 'x', 'o' }, '[[', function()
jump_to_prompt(nvim_terminal_prompt_ns, 0, args.buf, -vim.v.count1)
end, { buffer = args.buf, desc = 'Jump [count] shell prompts backward' })
- vim.keymap.set({ 'n', 'x' }, ']]', function()
+ vim.keymap.set({ 'n', 'x', 'o' }, ']]', function()
jump_to_prompt(nvim_terminal_prompt_ns, 0, args.buf, vim.v.count1)
end, { buffer = args.buf, desc = 'Jump [count] shell prompts forward' })
end,