1

When the vim-fireplace plugin prints an error stack into the preview window, it includes a bunch of control characters. Example:

vim-fireplace error stack

I tried set nolist but it had no effect. Does anyone know how to get rid of them?

5
  • 1
    That's more likely an issue with the error stack being printed—it's probably trying to include colors when it shouldn't. You can do a substitute command to get rid of them (I don't have the link, but searching should find it). Better would be to get the printer to not output color though
    – D. Ben Knoble
    Commented Apr 13, 2022 at 13:52
  • I've now tried it with everything but fireplace commented out in vimrc, in a "stock" macos terminal and empty ~/.lein/profiles.clj. This is the primary functionality of vim-fireplace, so I'll open an issue. Thanks.
    – apostl3pol
    Commented Apr 13, 2022 at 17:24
  • Thinking about this some more, I may have misunderstood you. I think you're implying that it's coming from the error/logging library I'm using. I'll look into that.
    – apostl3pol
    Commented Apr 13, 2022 at 17:51
  • 1
    Yes, that's what I failed to explain: fireplace is acting more like a messenger, passing the output of something to vim for display. The "something" is giving back output with control characters that look like color sequences (to me). If you can tell the "something" to not do that (namely, when its output is not to a tty device), that should solve the issue. [rant] people put colors in their tools, and then forget that in some situations colors should not be used [/rant]
    – D. Ben Knoble
    Commented Apr 13, 2022 at 18:09
  • I found stackoverflow.com/questions/10592715/ansi-color-codes-in-vim, which works for fireplace's history buffer with the :Last command. Now I just need to figure out how to use in in the command output window...
    – apostl3pol
    Commented Apr 13, 2022 at 20:35

1 Answer 1

2

Thanks to @D. Ben Knoble for helping me to understand what was going on. It was the timbre logging library that was adding the color characters.

To turn them off, I added the following to my environment:

export TAOENSSO_TIMBRE_DEFAULT_STACKTRACE_FONTS_EDN='{}'

When viewing the logs in a buffer, it's also possible to show the colors as intended with the Colorizer plugin with the :ColorHighlight command.

1
  • 1
    lol, I use that plugin and didn't even know it had that, nice!
    – D. Ben Knoble
    Commented Apr 14, 2022 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.