On Sep 22, 2013 2:06 AM, "Somelauw void" <somelauw@gmail.com> wrote:
>
> Hi, I want to use vim's concealing feature.
>
> I got it to work on greek symbols so far.
>
> " Works
> au VimEnter * syntax keyword Statement alpha conceal cchar=α
> au VimEnter * syntax keyword Statement beta conceal cchar=β
> au VimEnter * syntax keyword Statement lambda conceal cchar=λ
> au VimEnter * syntax keyword Statement pi conceal cchar=π
>
> " Don't work
> au VimEnter * syntax keyword Statement <= conceal cchar=≤
> au VimEnter * syntax keyword Statement >= conceal cchar=≥
>
> au VimEnter * hi! link Conceal Statement
> au VimEnter * set conceallevel=2
>
> But it doesn't work on the comparison operators like <= and >=.
> Is there any way to make them work on these operators as well?
Do not use :syn keyword for non-keywords, use :syn match. Also note that
1. What you have here only applies to one file you happen to open first. :e, :set filetype=..., :set syntax=... and other commands that trigger buffer or syntax reloading and your changes are gone. :au Syntax * may be correct (depends on whether this event will launch before or after main syntax file is loaded; most likely this depends on position of :au's relative to :syn on).
2. This will not work if matched operator is contained inside another syntax element. :syn ... containedin=ALL may fix it.
Also note that any additional rules may break existing syntax highlighting. This happen if they match :syn region start/end markers or disturb :syn ... nextgroup chain, or prevent :syn match from matching.
> --
> --
> 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/groups/opt_out.
--
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/groups/opt_out.
No comments:
Post a Comment