vim-unimpaired icon indicating copy to clipboard operation
vim-unimpaired copied to clipboard

Add an option to make all mappings `<silent>`

Open sghng opened this issue 5 months ago • 2 comments

This could be very helpful for certain users that use a pop up window for commands. If the mappings are not silent, the cmd pop up are quickly displayed and disappear, which is a little bit annoying.

function! s:Map(...) abort
  let [mode, head, rhs; rest] = a:000
  let flags = get(rest, 0, '') . (rhs =~# '^<Plug>' ? '' : '<script>')

Seems that we can simply add an option and make mappings silent here. it won't be a bit refactor.

sghng avatar Oct 01 '25 15:10 sghng

The option toggle maps ([o, ]o, yo) are deliberately non-silent because otherwise there would be zero visual feedback. I think everything else is already silenced?

tpope avatar Oct 01 '25 21:10 tpope

The option toggle maps ([o, ]o, yo) are deliberately non-silent because otherwise there would be zero visual feedback. I think everything else is already silenced?

Yes, these option toggle maps are what's bothering me, see the video attached:

https://github.com/user-attachments/assets/34ab63d4-639e-4ea1-969b-b7c955671be9

It does make sense to have visual effect for them, but as the video indicated it might be annoying for certain users. I haven't found an elegant way to silence them without touching plugin source code yet...

sghng avatar Oct 02 '25 14:10 sghng