Bram Moolenaar <[email protected]> wrote:

> Currently it's still possible to build Vim without multi-byte support.
> This leads to a large number of #ifdefs.  And is a text editor without
> multi-byte support still useful these days?
>
> The main reason to keep the multi-byte support optional is code size.
> The functionality of 8-bit editing is always available, if Vim is built
> with multi-byte support one can always set 'encoding' to "latin1" to
> edit with 8-bit characters.
>
> A change in behavior would be noticed for when a tiny Vim was used,
> which resulted in 'encoding' defaulting to "latin1".  With the feature
> included for many systems it would result in 'encoding' defaulting to
> "utf-8".  Nearly everything will still work though, also when editing
> latin1 text or a binary file.
>
> At least on Ubuntu, the smallest Vim distributed is vim.tiny, which does
> include the multi-byte features.
>
>
> Vim compiled with tiny features, GUI disabled, optimized, stripped:
>
> -rwxr-xr-x 1 user 1019120 Jan 11 13:53 vim
>
> Same, with the multi_byte feature:
>
> -rwxr-xr-x 1 user 1167616 Jan 11 14:01 vim
>
> So that is about 15% larger.  Does that worry anybody?

I'm in favor of removing #ifdef FEAT_MBYTE.

The fewer #ifdef, the fewer build configurations to test.

It's the most frequent #ifdef in Vim sources according
to this command:

$ cd vim/src
$ egrep -h '# *ifn?def' *.[ch] | sort | uniq -c | sort -n | tail -5
    236 #ifdef FEAT_DIFF
    274 #ifdef FEAT_FOLDING
    292 #ifdef FEAT_GUI
    371 #ifdef FEAT_EVAL
   1035 #ifdef FEAT_MBYTE

Unicode is now ubiquitous. Vim without multi_byte
feature is probably more a source of problems than
useful for only a few users who somehow may not want
Unicode support.

Defaulting 'encoding' to utf-8 instead of latin1 for vim.tiny
will probably help many newbies who are not familiar
with encoding.

Regards
Dominique

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui