How to Add ASCII Art in any Text File in Vim/Neovim

Posted by Chaitanya Shahare on Mon, Jul 24, 2023

Introduction

ASCII Art is very cool to look at in your config files for separating sections and making it look more readable.

Pre-requisites

  • Vim or Neovim
  • nodejs
  • Figlet, you can install it with the following command
     npm install -g figlet
    

How to Add ASCII Art in Any Text File in Vim Neovim

  1. Open the file in Vim or Neovim
  2. Press Esc key to enter the normal mode
  3. Press : key to enter the command mode
  4. Type .!figlet "Your Text Here" and press Enter key
  5. Done!! You have successfully added ASCII Art in your text file

adding ascii art in vim neovim

Conclusion

You can use this trick to add ASCII Art in any text file, it will make your config files look more readable and cool.