Saturday, October 3, 2020

Re: vimrc: identify "small" version vs "huge" version

On Fri, Oct 2, 2020 at 5:34 PM ping song <songpingemail@gmail.com> wrote:
>
> experts:
> I found in centos 7 there is /usr/bin/vi and /usr/bin/vim, with same version, patches.
> but vi is the "small" version and "vim" is the huge one.
> obviously both will use same .vimrc, and when vi is used a lot of errors pop up because of the much less features compiled.
> how do I differ these two in my .vimrc file?
>
> thanks.

The most important diference is that the "small" and "tiny" versions
are compiled without the +eval feature. A possible solution takes
advantage of the fact that in -eval builds, the :if .. :endif complex
statement becomes a nestable comment: so if you add "if 1" at the
start of your vimrc and "endif" at the end, everything in between will
be ignored by the "small" version.

If that seems too much for you, you could write at the top a few
unconditional statements compatible with the "small" version (see
:help +feature-list and use only features preceded by S or T) then
after that write "if 1" alone on a line, any statements to be
interpreted only by builds compiled with +eval, and finally "endif",
again alone on its line.

Best regards,
Tony.

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXvGe9%3DdbnRH5xAsJGWrQ-h0ku30aW2NFmxcuNTZPB46rg%40mail.gmail.com.

No comments: