Saturday, October 29, 2016

Re: How gVIM can handle UTF like notepad

On Tuesday, October 11, 2016 at 5:17:33 AM UTC-5, Gabriele wrote:
> On 10/10/2016 17.42, Ben Fritz wrote:
> > To detect this automatically, be sure that you have "set
> > encoding=utf-8", "setglobal bomb", and "set
> > fileencodings=ucs-bomb,utf-8,latin1" or similar in your .vimrc.
> > http://vim.wikia.com/wiki/Working_with_Unicode
>
> Can you tell me if you intentionally used "setglobal" for "bomb", or you
> just copied what's in that wiki?
> On my system the global bomb setting is not used if I don't also add
> "setlocal bomb<" or "set bomb<".
>
> It is likely that on that wiki "setglobal" was used just by chance,
> because that's what was used for fileencoding, see
> http://vim.wikia.com/wiki/Working_with_Unicode?diff=29876&oldid=29794 .
>

I'm sure I intentionally used "setglobal bomb". When I experiment with "gvim -N -u NONE -i NONE" and then ":set encoding=utf-8" and ":setglobal bomb", any new buffer I create *after* this via ":new" will automatically get 'bomb' set. If I omit the ":setglobal bomb" then new buffers do NOT get 'bomb' set by default.

Note that the initial buffer created on Vim startup will not have 'bomb' set from the setglobal command. If you need that first buffer to also have 'bomb' set then yes, you will need a setlocal or set command as well.

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