From 57b4fb5c5318394b82508492232d6e926ef8f23f Mon Sep 17 00:00:00 2001 From: Ghjuvan Lacambre Date: Mon, 31 Mar 2025 15:22:21 +0200 Subject: fix(defaults): enable :terminal [[,]] motion in operator-pending mode #33217 This enables y]] to copy a command and its output. --- runtime/lua/vim/_defaults.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/lua/vim/_defaults.lua b/runtime/lua/vim/_defaults.lua index 3cb38be450..adec7bda93 100644 --- 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, -- cgit