On Fri, Jan 11, 2019 at 4:37 PM Dominique Pellé <[email protected]> wrote: > > 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
I'm not particularly in favour of keeping the ability to build without +multi_byte (and/or without +multi_lang) except that my configure arguments for the tiny build (which I build mostly as a sanity test for "compilability" without bells and whistles, I don't really "use" it) include an explicit --disable-multibyte. Will that: - be treated as an error and cause "make" to stop then and there with nonzero exit code? (IMHO not desirable) - be treated as a comment? (IMHO better) - cause auto/configure to issue a warning message but disregard that particular --disable argument? (IMHO best: doesn't break backward compatibility but warns the user that it is no longer possible to disable that feature) Best regards, Tony. -- -- 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.
