Wednesday, September 24, 2014

Re: Some abbreviations work only as imaps

On Wed, 24 Sep 2014 09:39:02 +0200
Christian Brabandt <cblists@256bit.org> wrote:

> Am 2014-09-24 08:49, schrieb Gevisz:
> > On Wed, 24 Sep 2014 07:55:33 +0200
> > Christian Brabandt <cblists@256bit.org> wrote:
> >
> >> Am 2014-09-24 07:13, schrieb Gevisz:
> >> > I have noticed that some abbreviations I define never
> >> > expand but they do if I redefine them via imaps.
> >> >
> >> > Does anybody can guess a possible reason for that?
> >>
> >> Have you checked, that the constraints given below (:h
> >> Abbreviations, look for the paragraph: "There are three types of
> >> abbreviations:") do apply? Abbreviations actually might become
> >> invalid, if you mess with the 'iskeyword' setting later on (after
> >> they have been defined).
> >
> > That explanation is unclear for me because I cannot understand which
> > symbols iskeyword in my settings. The command
> > :set iskeywords
> > returns
> > iskeyword=!-~,^*,^|,^",192-255
> > in my case.
>
> Yeah, it is hard to read that part. What I usually do is, paste the
> abbreviation command
> into a new buffer and check with searching for \k to see which part
> of the abbreviation
> matches the 'iskeyword' setting. This helps understanding which of
> the 3 different types of
> abbreviations are used for that particular one.
>
> Let me ask the question differently. Does your problem happen with a
> particular abbreviation or does it happen with all abbreviations?

Some abbreviations expand as desired and some do not.

> Are there any circumstances different between a working abbreviation
> and a not working abbreviation?

They may be very similar. For example, abbreviation чкпк expands as
desired, whereas abbreviation чкпр does not expand at all unless I
redefine it via imaps. (The only difference between чкпк and чкпр is
in the last cyrillic letter.)

> Have you tried, testing with
> vim -u NONE -N (to eliminate the effect of any plugins)?

I have just tried that. No abbreviation works after starting vim with
such parameters. However, when I define these two abbreviation anew in
thus started vim, I get the same picture: чкпк abbreviation works and
чкпр one do not.

> You might also want to use :verbose set isk?
> to see, if Vim knows, when and where that setting has been changed
> the last time (for example a plugin).

Just after starting gvim:
:verbose set isk
iskeyword=@,48-57,_,192-255
Last set from ~/.vimrc

After loading the file with my extension:
:verbose set isk
iskeyword=@,48-57,_,192-255
Last set from ~/.vimrc

That is, the same result. So, my ~/.vim/ftplugin/ext.vim with my
abbreviations does not change anything in this set.

> > But I guess that my abbreviations should not mix with anything else
> > as they consist only from cyrillic letters.
> >
> > I used to set
> > langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz
> > but nothing changed (to the better :) when I commented it out.
>
> I am not sure, if the 'langmap' option has an influence at all.
>
>
> Best,
> Christian
>

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

Post a Comment