Vim-devicons: Is appendArtifactFix still needed?

Created on 14 Jan 2018  路  6Comments  路  Source: ryanoasis/vim-devicons

https://github.com/ryanoasis/vim-devicons/blob/a3e50225a8d544c9eff9c53c5405269a1b2b29f8/plugin/webdevicons.vim#L595

I had a look at issues #58 and #197 which seemed related to this variable, it took me a while to find it hidden in the code while I was trying to remove a nbsp from showing up next to the file type icons in NERDTree. I only realised it because I use listchars to show also the nbsp's.
I have now set appendArtifactFix to 0 and I didn't encounter any drawbacks.
Could anyone check whether this variable still needs to be set to 1, or perhaps consider to provide a variable to be set in .vimrc?

Most helpful comment

or perhaps consider to provide a variable to be set in .vimrc

Yeah I think this is a very sensible improvement to make.

still needs to be set to 1 ?

So it has been a while since I added that logic and trying to remember why I added it in with other changes to fix 'Folder titles off by a single space after opening' #197

So the "fix" was/is very hacky and now looking it makes me blush. Anyway I believe that was added only for problems with the glyphs being cut off in Gui Vim implementations.

Plan of action

To flag or not to flag

  • Determine necessity of flag

    • if no obvious discrepancies across OS and Gui vs. terminal change default to off (0)
    • perhaps default to on (1) on gui?
    • if there are any discrepancies leave as default of on (1)

      Make configurable

  • Make the option configurable

    • We should be able to both turn or off the option as well as specify the unicode hex
    • something akin to:
      vim " Default of 0 meaning off, " any string value would mean that is used as the character " to print after glyphs if !exists('g:DevIconsArtifactFix') let g:DevIconsArtifactFix = 0 endif

      Ensure consistent use of padding

  • Ensure consistent use of g:WebDevIconsNerdTreeAfterGlyphPadding throughout the code

    • Currently not consistently used.. causing 'bugs'

      Test

  • Test (Windows, Linux, MacOS: both Gui and terminal)

    • regression test #58 and #197 using various settings people have posted
    • basic NERDTree navigation of opening, closing, changing root of folders, closing/opening NERDTree

I would request and require some help testing, particularly in MacOS land..

I would also ideally like to ask @ismay if they mind to help ensure no regression to fix reported. Barring that we can test using the settings reported in the issue (#197)

All 6 comments

or perhaps consider to provide a variable to be set in .vimrc

Yeah I think this is a very sensible improvement to make.

still needs to be set to 1 ?

So it has been a while since I added that logic and trying to remember why I added it in with other changes to fix 'Folder titles off by a single space after opening' #197

So the "fix" was/is very hacky and now looking it makes me blush. Anyway I believe that was added only for problems with the glyphs being cut off in Gui Vim implementations.

Plan of action

To flag or not to flag

  • Determine necessity of flag

    • if no obvious discrepancies across OS and Gui vs. terminal change default to off (0)
    • perhaps default to on (1) on gui?
    • if there are any discrepancies leave as default of on (1)

      Make configurable

  • Make the option configurable

    • We should be able to both turn or off the option as well as specify the unicode hex
    • something akin to:
      vim " Default of 0 meaning off, " any string value would mean that is used as the character " to print after glyphs if !exists('g:DevIconsArtifactFix') let g:DevIconsArtifactFix = 0 endif

      Ensure consistent use of padding

  • Ensure consistent use of g:WebDevIconsNerdTreeAfterGlyphPadding throughout the code

    • Currently not consistently used.. causing 'bugs'

      Test

  • Test (Windows, Linux, MacOS: both Gui and terminal)

    • regression test #58 and #197 using various settings people have posted
    • basic NERDTree navigation of opening, closing, changing root of folders, closing/opening NERDTree

I would request and require some help testing, particularly in MacOS land..

I would also ideally like to ask @ismay if they mind to help ensure no regression to fix reported. Barring that we can test using the settings reported in the issue (#197)

I think we are probably good with this now at least it should be consistent :crossed_fingers:

I will do more testing tomorrow, if anyone else could test latest master I would greatly appreciate it :heart:

List to check off tomorrow:

  • [x] Make all options configurable
  • [x] Reasonable defaults depending on gui or terminal vim
  • [ ] Consistent use of padding (just need to double check)
  • [x] Regression test #58
  • [ ] Regression test #197
  • [x] basic NERDTree actions: opening, closing, changing root of folders, closing/opening NERDTree

basic NERDTree actions: opening, closing, changing root of folders, closing/opening NERDTree

Get that squared away. I've been using it with my local fix heavily for at least 20 days without any problem.

@kutsan Yeah I figure it's good just want to see it for myself, thanks for the info!

@ryanoasis For the sake of info, this is what it looks like in MacVim. Removing artifact fix chars solve that problem. I don't think it's needed anymore.

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kiranps picture kiranps  路  7Comments

PetarMetodiev picture PetarMetodiev  路  10Comments

ntropia2 picture ntropia2  路  4Comments

ctaylo21 picture ctaylo21  路  3Comments

marioortizmanero picture marioortizmanero  路  3Comments