indentLine icon indicating copy to clipboard operation
indentLine copied to clipboard

Error when using glyph code in g:indentLine_char

Open obxhdx opened this issue 10 years ago • 12 comments

I followed the patching tutorial and added g:indentLine_char = "U+E000" to my .vimrc.

But when I open Vim, I see the error E475: Invalid argument: IndentLine /\%(^\s\+\)\@<=\%7v / containedin=ALL conceal cchar=U+E000.

How should I correctly reference the new glyph I created?

obxhdx avatar Sep 21 '14 03:09 obxhdx

I am having the same issue. I am guessing no solution was found or is forthcoming (?)

sheriferson avatar Mar 01 '15 23:03 sheriferson

I'm seeing this as well. I tried grepping through the project a bit, but I confess I don't even know where to start in trying to help fix/root cause this.

seanmckinley avatar Jul 17 '15 18:07 seanmckinley

use the newly created glyph from the font instead of using unicode, i.e. "U+E0A3".

let g:indentLine_char = " ︙" where " ︙" will be replaced by the glyph created using font forge.

HiCodin avatar Sep 16 '15 05:09 HiCodin

Welp, that totally worked. HiCodin you're my new best friend. Thanks a ton

seanmckinley avatar Sep 16 '15 17:09 seanmckinley

@HiCodin and/or @seanmckinley Did you just copy the glyph from within fontforge and past it into .vimrc?

sheriferson avatar Sep 16 '15 20:09 sheriferson

@sheriferson I actually copied the character straight out of HiCodin's comment above and threw it into my .vimrc, after having patched the font of course.

seanmckinley avatar Sep 16 '15 20:09 seanmckinley

@seanmckinley Thanks for replying. I tried doing that and it just throws the same error, even though I've opened the font directly in FontForge and confirmed it's been patched. Not sure what else to try. screenshot 2015-09-16 17 57 28

sheriferson avatar Sep 16 '15 21:09 sheriferson

Finally did manage to fix it. I had to right click the glyph, go to Glyph Info, right click on the Unicode Char, save it to file, and then copy/paste it from there.

sheriferson avatar Sep 16 '15 23:09 sheriferson

@sheriferson would you mind if I ask you how did you manage this? I.e. could you provide a more detailed instruction? I followed the instructions from the main page of the plugin, run into the same problem as others and then followed your last instructions, but

  1. I do not see a unicode char in the glyph info, instead only some scribble

indent_guides_vim_plugin_1

  1. I saved it to a file anyway, set the font of a terminal to my newly created one, then I did cat the file into the terminal and even there I did not see the glyph, instead only this:

indent_guides_2

So could you please tell with more details, I see you reassigned some Chinese character to your glyph instead of using an unassigned code point.

koroliov avatar Jan 19 '16 18:01 koroliov

I found the error. I was supposed to set the glyph for U+E000 code point, while I was trying to do this with an arbitrary empty one.

koroliov avatar Jan 19 '16 19:01 koroliov

Glad you figured it out.

How is it looking for you? I spent a lot of time trying to get it to work, and in the end the payoff wasn't worth it. Because this is just a character that is stacked on top of itself in vim, I found that for the majority of fonts and linespaces, it looked off because the bottom dot of the character in the line above was either too close or too far from the top dot of the character on the line below. I don't think the Sublime Text aesthetic is achievable in vim because it will never be like the web technology ST is built on. I ended up moving to vim-indent-guides and it looks better.

On 19 Jan 2016, at 14:38, koroliov wrote:

I found the error. I was supposed to set the glyph for U+E000 code point, while I was trying to do this with an arbitrary empty one.


Reply to this email directly or view it on GitHub: https://github.com/Yggdroot/indentLine/issues/98#issuecomment-172962148

sheriferson avatar Jan 19 '16 20:01 sheriferson

@sheriferson I use only spaces, not tabs and I have the listchars option set to show spaces as a middle dot. Also I found a decent tool to find some unicode character by its hand-drawing ( http://shapecatcher.com/ ). So I found the "Modifier letter mid dotted left-stem tone bar: ꜏" (Uxa70f) character and slightly modified its glyph following the instructions to patch a font from this plugin. It looks now this way:

vim_indentation_is_working

It is not like in Sublime (I actually used Komodo Edit) but for me the annoying issue was the fact that a guide line was hiding white space characters. So now I made it show the guide and a white space at the same time.

koroliov avatar Jan 19 '16 21:01 koroliov