Skip to content
This repository has been archived by the owner on Jun 20, 2020. It is now read-only.

Convert a text selection to ASCII art using FIGlet and auto-comment

License

Notifications You must be signed in to change notification settings

masavini/atom-minimap-titles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimap Titles

Atom package to convert the selected text to ASCII art using FIGlet and then comment it.

The chosen figlet font (ANSI Shadow) is perfect for minimap visualization. Commenting supports several file extensions:

  • js
  • sh, bash
  • yml, yaml
  • css, scss, sass
  • coffee
  • html
  • md
  • php
  • vb
  • njk
  • py
  • tex, cls
  • sql

Files with no extension will be treated as Shell scripts.

Select some text to convert something like this:

hello world

into something like this:

# ██   ██ ███████ ██      ██       ██████      ██     ██  ██████  ██████  ██      ██████  
# ██   ██ ██      ██      ██      ██    ██     ██     ██ ██    ██ ██   ██ ██      ██   ██
# ███████ █████   ██      ██      ██    ██     ██  █  ██ ██    ██ ██████  ██      ██   ██
# ██   ██ ██      ██      ██      ██    ██     ██ ███ ██ ██    ██ ██   ██ ██      ██   ██
# ██   ██ ███████ ███████ ███████  ██████       ███ ███   ██████  ██   ██ ███████ ██████

you can also Toggle Comment Borders to put a border around the text to add more distinction in the minimap:

###############################################################################
# ██   ██ ███████ ██      ██       ██████      ██     ██  ██████  ██████  ██      ██████
# ██   ██ ██      ██      ██      ██    ██     ██     ██ ██    ██ ██   ██ ██      ██   ██
# ███████ █████   ██      ██      ██    ██     ██  █  ██ ██    ██ ██████  ██      ██   ██
# ██   ██ ██      ██      ██      ██    ██     ██ ███ ██ ██    ██ ██   ██ ██      ██   ██
# ██   ██ ███████ ███████ ███████  ██████       ███ ███   ██████  ██   ██ ███████ ██████
###############################################################################

Note that Toggle Comment Borders determines border size based on your editors preferred line length, Atom's default is 80 as shown above.

The difference is slight and completely based on user preference:

Border vs. No Border Example

Usage

To convert text, select the text you wish to convert, and do any of the following:

  • Press ctrl-shift-del or
  • Select Minimap Titles: Convert in the command palette or
  • Select Packages -> Minimap Titles -> Convert from the main menu or
  • Right click on the selected text, and select Minimap Titles: Convert from the context menu

To create comment borders around text to help distinguish sections in the minimap do the following:

  • Select Packages -> Minimap Titles -> Toggle Comment Borders from the main menu
  • Run the Convert command on your text as detailed above

To set a custom font, set atom-minimap-titles.font in your atom config file, as such:

"atom-minimap-titles":
  font: "Colossal"

See existing fonts in the figlet font database.

Credits

Based on the following packages:

About

Convert a text selection to ASCII art using FIGlet and auto-comment

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 100.0%