Comment.nvim icon indicating copy to clipboard operation
Comment.nvim copied to clipboard

Fix ill-formatted ASCII header in vim help file

Open tuurep opened this issue 1 year ago • 1 comments

Two problems:

  1. Spacing seems to be all over the place
  2. Some characters get hidden due to ` being a conceal character in vim help files

Confusion: I suspected the art is generated by figlet/toilet, but couldn't find the exact font you're using.

$ figlet -f slant Comment.nvim
   ______                                     __               _
  / ____/___  ____ ___  ____ ___  ___  ____  / /_  ____ _   __(_)___ ___
 / /   / __ \/ __ `__ \/ __ `__ \/ _ \/ __ \/ __/ / __ \ | / / / __ `__ \
/ /___/ /_/ / / / / / / / / / / /  __/ / / / /__ / / / / |/ / / / / / / /
\____/\____/_/ /_/ /_/_/ /_/ /_/\___/_/ /_/\__(_)_/ /_/|___/_/_/ /_/ /_/
$ figlet -f big Comment.nvim

  _____                                     _                _
 / ____|                                   | |              (_)
| |     ___  _ __ ___  _ __ ___   ___ _ __ | |_   _ ____   ___ _ __ ___
| |    / _ \| '_ ` _ \| '_ ` _ \ / _ \ '_ \| __| | '_ \ \ / / | '_ ` _ \
| |___| (_) | | | | | | | | | | |  __/ | | | |_ _| | | \ V /| | | | | | |
 \_____\___/|_| |_| |_|_| |_| |_|\___|_| |_|\__(_)_| |_|\_/ |_|_| |_| |_|

It looks like a mix between these two, but there are also some confusing differences I could not figure out. I edited some parts by hand.

To avoid the conceal character problem, I put the header in a quote block (>)

This makes it appear as a different color, which may be a downside.

  • Any other ideas to escape conceal characters?
  • How did you generate that ASCII font?

Before:

image

After:

image

tuurep avatar Jan 31 '25 21:01 tuurep

Actually I notice that most likely it's like figlet -f big, but all | characters have been replaced by /.

Start:

     _____                                     _                _
    / ____/                                   / /              (_)
   / /     ___  _ __ ___  _ __ ___   ___ _ __ / /_   _ ____   ___ _ __ ___
   / /    / _ \/ '_ ` _ \/ '_ ` _ \ / _ \ '_ \/ __/ / '_ \ \ / / / '_ ` _ \
   / /___/ (_) / / / / / / / / / / /  __/ / / / /_ _/ / / \ V // / / / / / /
    \_____\___//_/ /_/ /_/_/ /_/ /_/\___/_/ /_/\__(_)_/ /_/\_/ /_/_/ /_/ /_/

:%s/\//|/g:

     _____                                     _                _
    | ____|                                   | |              (_)
   | |     ___  _ __ ___  _ __ ___   ___ _ __ | |_   _ ____   ___ _ __ ___
   | |    | _ \| '_ ` _ \| '_ ` _ \ | _ \ '_ \| __| | '_ \ \ | | | '_ ` _ \
   | |___| (_) | | | | | | | | | | |  __| | | | |_ _| | | \ V || | | | | | |
    \_____\___||_| |_| |_|_| |_| |_|\___|_| |_|\__(_)_| |_|\_| |_|_| |_| |_|

This overcorrects a little bit, change some |s back:

     _____                                     _                _
    / ____|                                   | |              (_)
   | |     ___  _ __ ___  _ __ ___   ___ _ __ | |_   _ ____   ___ _ __ ___
   | |    / _ \| '_ ` _ \| '_ ` _ \ / _ \ '_ \| __| | '_ \ \ | | | '_ ` _ \
   | |___| (_) | | | | | | | | | | |  __| | | | |_ _| | | \ V /| | | | | | |
    \_____\___/|_| |_| |_|_| |_| |_|\___|_| |_|\__(_)_| |_|\_/ |_|_| |_| |_|

It threw me off because the first instinct is to try to align the C like this:

https://github.com/user-attachments/assets/bb9c958b-01c4-4d98-a67b-3c5c5e3700de

tuurep avatar Feb 09 '25 20:02 tuurep