aliquote.org

June 30, 2021

True concealing in Vim using multiple characters (thanks to Brian Albert Monroe). Add this in your Vim config (possibly in after/syntax/r.vim):

call matchadd('Conceal', '|>\&|', 10, -1, {'conceal':'»'})
call matchadd('Conceal', '|\zs>', 10, -1, {'conceal':'='})

syntax match rOperator "%>%" conceal cchar=»

hi! link Conceal Operator

Not sure I will really need the magrittr’s pipe operator, so I didn’t bother using Haskell’s monad sequencing operator with value passing.

Result:

vim