Friday, September 15, 2017

Re: Don't load specific keymap when pasting

On Fr, 15 Sep 2017, Steve wrote:

> Hello,
>
> I have these line in ~/.vim/keymap/touchesfr.vim
>
> loadkeymap
> « «<Char-0xa0>
> » <Char-0xa0>»
> ? <Char-0xa0>?
> ! <Char-0xa0>!
> : <Char-0xa0>:
> ; <Char-0xa0>;
>
> because in French you need a non-breaking space before or after a double
> punctuation. Works great when editing text. But I often want to
> copy-paste an URL and if it contains one of those double punctuation,
> I'll end with <Char-0xa0> in it. So I'll have to manually delete it
> which is rather annoying.
>
> So the question is how could I do to not have this behaviour when
> copy-pasting?

Depends on how you paste. If you paste from the clipboard (and your vim
is compiled with clipboard support) this shouldn't happen. However if
you use something like MiddleMouse Paste with your mouse using X
selection, Vim cannot distinguish this from typing. So you would have to
set `:set paste`.

Best,
Christian
--
Nichts verschafft einem so schnell Achtung, wie wenn man seine
Mitmenschen wissen läßt, daß man ihnen gewachsen ist.
-- Vita Sackville-West (Erloschenes Feuer)

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: