dpelle / vim-LanguageTool

A vim plugin for the LanguageTool grammar checker
281 stars 28 forks source link

make window switching more robust to custom key bindings #27

Closed Maelan closed 1 month ago

Maelan commented 3 years ago

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.

Maelan commented 2 years ago

Hi! Any news on this? The patch is very short, should be easy to review.