Re: Getting a more readable font

2023-04-18 Thread Tony Mechelynck
On Tuesday, April 18, 2023 at 5:58:25 PM UTC+2 Yee Cheng Chin wrote:

No, please *don't* set fileencoding, encoding, or fileformats in your vimrc 
at all. That's not where those settings should go and in fact you should 
rarely need to set these settings. The default works just fine. I recommend 
reading the documentation on what each one does. Online snippets like 
StackOverflow and great for addressing specific needs but they are not good 
for setting up a vimrc cohesively.

Setting 'encoding' etc. in the vimrc _may_ be a good idea if they aren't 
yet set to utf-8 (this usually means on Windows but it might happen on any 
weirdly set system). The snippet below, somewhere near the top of your 
vimrc, will make sure that Vim, on any system, uses utf-8 internally, which 
will allow it to process files in any encoding (for some unusual ones you 
may have to tell it what to use in the :new or :edit command for the file, 
see ":help ++enc"). This snippet is written using non-vim9 syntax; I've 
liberally added comments (take them or leave them, they make of course no 
difference to the snippet's working) to make it easier to understand.

" save the keyboard locale if defaulted to the same as 'encoding'
if  == ""
let  = 
endif
" if 'encoding' is not already some Unicode Transfer Format,
" use UTF-8
if  !~? '^u'
set enc=utf-8
endif
" The following ('fencs' with a final s) defines the heuristic to use
" when reading a file, to determine its encoding.
" It is a comma-separated list with no intervening spaces.
" It may be varied as follows:
" * ucs-bom should come first; it will recognize Unicode files having
" a BOM (byte-order mark ; "encoding mark" would be a better
" designation) i.e. a U+FEFF codepoint as the very first character.
" * utf-8 should come next ; it will recognize files encoded in UTF-8
" even without BOM.
" * default will use (if possible) the system default locale
" ($LC_CTYPE or equivalent) as set on your computer. If it is an 8-bit
" encoding it will always be accepted.
" * latin1 (or some other predefined 8-bit encoding) should come last,
" especially if the default encoding is not before it or is not 8-bit. It 
will
" catch whatever has not yet been caught by whatever is to its left.
set fencs=ucs-bom,utf-8,default,latin1
" The following ('fenc' without the final s, defined globally) defines
" what to use when creating a new file from scratch.
" One advantage of UTF-8 is that files containing only characters
" in the range 0x00 to 0x7F are represented identically in UTF-8
" and in (7-bit) us-ascii. You might prefer some other default: YMMV.
setg fenc=utf-8

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_mac+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_mac/28aa43dd-9c8f-4e93-9d02-4e5f2dd69594n%40googlegroups.com.


Re: Getting a more readable font

2023-04-18 Thread Yee Cheng Chin
No, please *don't* set fileencoding, encoding, or fileformats in your vimrc
at all. That's not where those settings should go and in fact you should
rarely need to set these settings. The default works just fine. I recommend
reading the documentation on what each one does. Online snippets like
StackOverflow and great for addressing specific needs but they are not good
for setting up a vimrc cohesively.

On Tue, Apr 18, 2023 at 12:58 AM Eric Weir  wrote:

>
> > On Apr 16, 2023, at 2:20 PM, Yee Cheng Chin 
> wrote:
> >
> > After you picked the font, the setting is only set in memory. You need
> to change your vimrc for the setting to persist. The easiest way to find
> out what the font is set to is by doing "set guifont?", which will show you
> what the font picker chose. You can copy that setting to your vimrc for it
> to stick.
>
> Somehow, something I thought I’d already done worked on a second try. Or
> so it seemed. Menlo:h14 gives me what I was groping for.
>
> Thanks,
>
> --
> Eric Weir
> Decatur, GA  USA
> eew...@comcast.net
>
> “Look deep into nature, you will understand everything better.”
>
> - Albert Einstein
>
> --
> --
> You received this message from the "vim_mac" 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_mac" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_mac+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vim_mac/0E4086CA--4FD4-BE2A-21EDEDD738A4%40comcast.net
> .
>

-- 
-- 
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_mac+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_mac/CAHTeOx_91FgiaVmkeiWjuhPHQD97_8J7vrytTyRofvy2_oDWjA%40mail.gmail.com.