Friday, October 25, 2013

RE: Re: vim-latex/latex-suite macros like FEM in nonEnglish languages

> Tue 15 Oct 2013 08:41:59 PM MSK пользователь BPJ (bpj@melroch.se) написал:
>
> 2013-10-15 16:12, BPJ skrev:
> > 2013-10-13 23:43, Nikolay Pavlov skrev:
> >> On Oct 13, 2013 9:23 PM, "Vandra _" <vanpva@rambler.ru> wrote:
> >>>
> >>>
> >>> I work on a book in Russian using vim-latex. While in insert
> >>> mode in Russian (with keymap command c-^) latex-suite
> >> macros like FEM don't work.
> >>> Thats indeed very embarrassing. Is there a way to get them
> >>> work in
> >> nonEnglish languages?
> >>> Thanks!
> >>
> >> You mean, those that are created using IMAP function? AFAIK
> >> they work like this: map the last character (M in your case)
> >> and when it is typed check whether the preceding characters
> >> are present just before the cursor. If they are, IMAP deletes
> >> them and does what it was requested, otherwise it returns the
> >> last character which will then be inserted. I do not know how
> >> mappings interact with &keymap, but as with &keymap preceding
> >> characters (FE in your case) are replaced with Russian ones
> >> IMAP will not work. I do not know any way around this without
> >> modifying IMAP to be &keymap-aware.
> >>
> >> I personally just disabled all these macros for them being too
> >> intrusive (do not remember which of them exactly though).
> >
> > The best advice I have is to imap some function key or the like
> > to 'toggle' iminsert and use it before and after other imaps.
> >
> > /bpj
> >
>
> I sent too soon. I meant
>
>      :inoremap <F12><F12> <C-O>:let &iminsert = &iminsert ? 0 : 2<CR>
>
> if you use an ΙΜ (Input Method) in your system and not a Vim
> keymap. CTRL-^ won't help you in that case.
>
> I can't imagine what it would be otherwise. If I imap a letter
> sequence like FEM it works even when I have my BetaCode keymap on
> and typing FEM would normally give me φεμ, OTOH there is no way I
> can type FEM/φεμ in insert mode anymore! Then it hit me you may
> need to increase 'timeoutlen'. If I :set timeoutlen=1000 (the
> default) such a mapping does *not* work anymore: I get Greek
> letters and the mapping doesn't fire. With my usual :set
> timeoutlen=5000 the mapping works. The downside (which I'd come
> to be so used to that I'd forgotten about it!) is that there is a
> noticeable delay when typing with a keymap. I have a neurological
> disability which causes me to move rather slowly, so it's
> probable that for you such mappings will still work with some
> lower timeoutlen setting (the documentation recommends :set
> timeout timeoutlen=3000 ttimeoutlen=100 which is still sometimes
> too low for me but higher than the default :set timeoutlen=1000.
>
> see
>
>      :h ttimeout
>
> and *if* you're using an IM
>
>      :h 'iminsert'
>      :h i_CTRL-^
>      :h xim if you are on Linux
>      :h global-ime if you are on Windows
>
> Hope this helps!
>
> /bpj

to BPJ:
Thank you for the answer but it still does not work.
Like Nikolay Pavlov says you may type FE in insert mode,
after you even may edit the other part of the file, then return
and type M after FE and you will see it changed to \emph{<++>}<++>

Thank you!

--
--
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/groups/opt_out.

No comments: