> Hi all,
>
> I'd like to display "->" with "→ " in haskell files.
>
> But I have the impression the conceal mechanism only work to replace
> "->" by one character.
> An undesirable effect is a visually bad indentation.
>
> Is there a way to achieve this?
>
Yes -- place the following lines into $HOME/.vim/after/syntax/haskell.vim:
syn match HaskPointer '->'
contains=HaskPointerOne,HaskPointerTwo containedin=hsOperator
syn match HaskPointerOne '-' conceal contained cchar=→
syn match HaskPointerTwo '>' conceal contained cchar=
Note that that last cchar= is actually followed by a space; ie. "cchar=
", NOT "cchar=".
Regards,
Chip Campbell
--
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:
Post a Comment