Apparently, the key used for 'pastetoggle' is intercepted even in a :normal! command (!). For instance, if using :set pastetoggle=<C-P>, then :exe "normal! \<C-W>\<C-P> does not switch to the last window as expected. This was breaking the plugin for me, preventing error highlighting in the original window.
On the other hand, :wincmd p has the same effect and is apparently unaffected by 'pastetoggle' or custom key bindings–and it is simpler.
There are other occurrences of :norm! that I left as is, as the implied key bindings ($, G0, l, zz, z) seem unlikely to be used for 'pastetoggle', and I’m not sure how to replace them.
Apparently, the key used for
'pastetoggle'
is intercepted even in a:normal!
command (!). For instance, if using:set pastetoggle=<C-P>
, then:exe "normal! \<C-W>\<C-P>
does not switch to the last window as expected. This was breaking the plugin for me, preventing error highlighting in the original window.On the other hand,
:wincmd p
has the same effect and is apparently unaffected by'pastetoggle'
or custom key bindings–and it is simpler.There are other occurrences of
:norm!
that I left as is, as the implied key bindings ($, G0, l, zz, z
) seem unlikely to be used for'pastetoggle'
, and I’m not sure how to replace them.