Troy Piggins wrote:
I was looking for some helper commands for using something like
'figlet' from within vim.
Searched the vim scripts and closest I could find was the
larlet.vim script http://www.vim.org/scripts/script.php?script_id=1357
At present I have this in my .vimrc:
map ,f :r!figlet
I was wondering if anyone has something a little more advanced.
Perhaps a font chooser?
- Vim or gvim is meant to display exactly one character per character cell,
except in the case of "wide" East-Asian characters (which occupy two character
cells), combining characters (which do not occupy a distinct character cell),
nonprinting or invalid characters (which may be shown as "^P" (two cells),
"<fffe>" (six cells) etc.); and, of course, hard tabs (which occupy between 1
and 'tabstop' character cells). There is no provision for ASCII-art characters
in Vim.
- You can use figlet as a filter (see ":help filter"). It must of course be
present on your system (I have it in /usr/games/).
- A font chooser exists in the Windows, Mac, Photon, GTK1 and GTK2 versions of
gvim (for system fonts, be they bitmapped, TrueType, OpenType etc.):
:set guifont=*
You can set even very large (but monospaced!) fonts there if you want.
(Actually, GTK2 gvim accepts even non-monospaced fonts, but the result is
ugly: individual characters get clipped or spaced-out if they are larger or
narrower, respectively, than the character cell).
- Console Vim relies on whichever font is used by your terminal (Windows Dos
Box, xterm, konsole, gnome-terminal, Terminal.app, ...); setting the font in
the terminal depends on the terminal, not on Vim; how to set them (where it is
at all possible) varies from terminal to terminal.
Best regards,
Tony.
--
... the privileged being which we call human is distinguished from
other animals only by certain double-edged manifestations which in
charity we can only call "inhuman."
-- R. A. Lafferty