Friday, February 13, 2015

Re: why does showbreak setting works only after _vimrc is reloaded?

On Thursday, February 12, 2015 at 10:27:51 AM UTC-6, FlashBurn wrote:
> why would I want to use let instead of set in the suggestion below?
> > 2. Use the escape syntax of strings and a :let command, instead of a :set command, somewhere AFTER setting Vim's 'encoding' option. For example:
> > let &showbreak="\u2026"

Using "let" in this way allows you to use Vim's expression syntax to set an option rather than using the literal characters which cannot be represented in the default encoding of the script. See ":help :let-&". this can also be done using the :execute command (e.g. :exec "set showbreak=\u2026"), but I like the :let method better.

Either method has the effect of allowing you to use the "\u" syntax within a string to represent the special character. See ":help expr-quote" for details; this is similar to XML's character escapes like … in that they let you use any character in Vim's encoding, regardless of the encoding of the current script.

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