Saturday, July 28, 2012

Re: Display more characters as one

On Sat, Jul 28, 2012 at 03:32:11AM -0700, jachymb wrote:
> The idea is quite simple: Display certain character sequences in source code
> as one: for example "->" as "→", or "forall" as "∀" etc. The important
> thing is that the characters in the edited file are left unchanged, only are
> displayed differently to make the code look nicer and save some space on
> screen.
>
> Is this possible in vim too?

Yes, with the conceal feature, which was introduced
by the 7.3 release:

|cchar :syn-cchar
|
|The "cchar" argument defines the character shown in place of the item
|when it is concealed (setting "cchar" only makes sense when the conceal
|argument is given.) If "cchar" is not set then the default conceal
|character defined in the 'listchars' option is used. Example: >
| :syntax match Entity "&" conceal cchar=&
|See hl-Conceal for highlighting.

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

No comments: