FIGlet.vim : Finally, the power of Vim + FIGlet!
| script karma
Downloaded by 992
Comments, bugs, improvements
script versions (upload new version)
|:FIGlet operates over a range of text in your buffer. It has a completion function that will complete on installed font names, too.
Set g:use_FIGlet_as_operatorfunc to a true value in your vimrc file to enable the g@ operator to filter your text through figlet, in-place.
:FIGletFontDemo renders a sample of text through each installed figlet font.
Plus, there is a Windows/MS-DOS version of FIGlet, so everybody can get in on the fun!
Follow this plugin on GitHub: https://github.com/fadein/vim-FIGlet
Q: Can't I do this same thing with the :! command?
A: Basically, sure
Q: What does this plugin give me that Vim's built-in filtering doesn't?
A1. Convenience - through variables it can remember your preferences
A2. Completion - so you don't have to memorize all of the commands or font names
A3. Text-objects - use the g@ operator with text-objects for blazing fast transformations that will knock shoulder-surfer's socks off
A4. A font sample buffer to help you pick out the perfect font for the occasion
Q: Okay, I'm sold. But what is this FIGlet you speak of?
__ _ _ _
/ _(_) __ _| | ___| |_
| |_| |/ _` | |/ _ \ __|
| _| | (_| | | __/ |_
|_| |_|\__, |_|\___|\__|
Er, that wasn't quite as impressive as I was hoping. Check out http://www.figlet.org/ to get with the times.
|Make sure you've got the figlet program installed on your $PATH
Copy script into your .vim/plugin directory
Click on the package to download.
ip used for rating: 18.104.22.168
||Put function definitions into autoload/FIGlet.vim
Don't unconditionally clobber g@
Development on GitHub https://github.com/fadein/vim-FIGlet
||I cannot thank Suraj N. Kurapati enough for submitting a patch that sets the '[ and '] marks around the FIGlet-ified text. Thank you for your great work. If it weren't for you there wouldn't be a version 3.0!
This version also changes the spelling of the commands from :Figlet* to :FIGlet* in keeping with the style of www.figlet.org.
||:FigletFontDemo can be given a small sample of text to render; this lets you easily compare fonts
||Add :FigletFontDemo - open a buffer with generated samples of installed fonts
Bugfixes; use shellescape() on text sent to figlet; better able to cope with figlet crashes, work around broken DOS build of figlet