Saturday, October 2, 2010

Re: Mapping ` to , in visual mode

Ответ на сообщение «Re: Mapping ` to , in visual mode»,
присланное в 00:03:12 03 октября 2010, Воскресенье.
Отправитель: alexandre krispin:

> If you don't use the plugin latexsuite, could you tell me how you
> would map ` to , with virtual mode ?
If I am not mistaking, that
> I use latexsuite in Vim. When I want to select a block of text in
> visual mode in order to emphasize the text, I select it, and then
> press ` and em.
> Since I have a french keyboard (azerty), this is quit painful if I
> have to use it many times. For this reason I have tried to map the `
> to the , key but without success.
stands for the mapping `,' to «`», not the opposite (you need to press `,'
instead of «`», do you?). So, you need to exchange arguments:
vmap <silent> , `
As «`» itself is mapped by latexsuite to ``:<C-u>call ExecMap('`', 'v')<CR>'',
so you may want to replace it with more strict
vnoremap <silent> , :<C-u>call ExecMap('`', 'v')<CR>
, but this is not required: it is just me who tries to omit using `map' without
`nore' whenever it is possible, no matter what it does with readability.

Текст сообщения:
> On 2 oct, 20:44, "Israel Chauca F." <israelvar...@fastmail.fm> wrote:
> > On Oct 2, 2010, at 11:35 AM, alexandre krispin wrote:
> > > Hello,
> > >
> > > I use latexsuite in Vim. When I want to select a block of text in
> > > visual mode in order to emphasize the text, I select it, and then
> > > press ` and em.
> > > Since I have a french keyboard (azerty), this is quit painful if I
> > > have to use it many times. For this reason I have tried to map the `
> > > to the , key but without success.
> > >
> > > Since I have tried many ways to get it working, I couldn't sum up all
> > > the things I have tried. But here is an example of what I have tried :
> > > vmap <silent>`<ESC>,
> >
> > I don't know if it's exactly what you're trying, but that is wrong, you
> > must use a space to separate things:
> >
> > vmap <silent>` <Esc>,
> >
> > Israel
>
> Than you for your answer !
> I don't remember all the things I have tried, and for this reason I
> couldn't say if I put a space. But right now I have just try it and
> even with a space it doesn't work.
>
> If you don't use the plugin latexsuite, could you tell me how you
> would map ` to , with virtual mode ?
>
> --
> Alexandre Krispin

No comments: