noVIMber: Plugin Madness

VIM ships with a number of plugins, which are scripts that enhance VIM’s
basic functionality. You’ll find the plugins that shipped with your
copy of VIM in $VIMRUNTIME/plugin.

(Sub-tip: don’t know where VIM is installed? In vim, type “:echo
$VIMRUNTIME
“.)

We talked about syntax highlighting in an earlier tip. Syntax
highlighting is great and it makes code more readable, but if you take
your text file that’s all fancy in VIM and publish it on a web page
somewhere, it goes back to dreary black text.

But it doesn’t have to. With a syntax-highlighted file open, type:

ggVG

(that highlights the entire file)

:TOhtml

(that creates an HTML document of your highlighted file)

Cool, huh?

Another fun pair of plugins are gzip.vim and tarPlugin.vim. These are
great because you don’t have to do anything to activate them – just use
VIM to open a .gz or .tar file (or, for that matter, a .tar.gz file).
VIM will uncompress your gzipped file on the fly and re-compress it when
you’re done editing it. If you’re opening up a .tar file, VIM will give
you a list of the files in the tarball.

Happy VIMming!

- David Roth

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • StumbleUpon
  • Technorati
  • Tumblr
  • TwitThis
  • Fark
  • FriendFeed
  • HackerNews
  • Posterous
  • Slashdot

About druzziel

Bad Behavior has blocked 247 access attempts in the last 7 days.