de icon indicating copy to clipboard operation
de copied to clipboard

do we want to try symbol replacement in rendering plugins?

Open josephholsten opened this issue 9 years ago • 1 comments

for example, vim-pandoc-syntax uses the following symbols instead of the raw markdown text:

    let s:cchars = { 
        \"newline": "↵", 
        \"image": "▨", 
        \"super": "ⁿ", 
        \"sub": "ₙ", 
        \"strike": "x̶", 
        \"atx": "§",  
        \"codelang": "λ",
        \"codeend": "—",
        \"abbrev": "→",
        \"footnote": "†",
        \"definition": " ",
        \"li": "•",
                \"html_c_s": "‹",
                \"html_c_e": "›"}

josephholsten avatar Jul 01 '16 22:07 josephholsten

I foresee two problems with this:

  1. How do you edit a character in buffer the middle of a string that's getting mangled by the renderer?
  2. The image->character map already has a bug where it doesn't map multibyte unicode characters properly. This couldn't use the default imagemap, but would need to write its own imagemap, since using the default one would have similar issues.

That said, I don't have any issues with an alternative markdown renderer that you can switch to with the Renderer command which tries to do magic like this, I just think the default should be as faithful as it can be to the bytes in the text since if you're opening a file in an editor, it's probably because you want to edit it.

driusan avatar Jul 01 '16 22:07 driusan