Tuesday, March 29, 2011

Re: Function to write correctly French quotation marks

Hi Steve!

On Di, 29 Mär 2011, Steve wrote:

> Hi,
>
> A swedish chap suggested offlist a very good idea, which is to do a
> keymap mapping:
>
> Create a file ~/.vim/keymap/guilem.vim in which put:
>
> loadkeymap
> << «<Char-0xa0>
> >> <Char-0xa0>»
>
> And then
>
> :setl kmp=guilem
>
> This a good solution for several reasons, first of all it's rather
> simple :), then it can be extended to so-called double punctuation (<;>,
> <:>, <?> and <!>) which in French must be preceded by a <nbsp>. So all I
> have to do is add
>
> : <Char-0xa0>:
> ; <Char-0xa0>;
>
> etc... to have French writing automatically corrected. Very convenient.
> All is left to me is to remember to load this keymap, which should be
> fine, but if it could be done automatically when writing in French, it
> would be terrific. I guess I could set this by default (I write more
> often in French than in english) and disable it when writing in English
> (with something like :setl nokmp, right?). Detecting a language must not
> be easy I guess.

Interesting. I have never used keymaps before, but it looks promising.

regards,
Christian
--
Ein Pessimist ist ein Optimist, der nachgedacht hat.
-- Dan Bennet

--
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

No comments: