Textile in vim - edit your text files with wiki markup

Warning: This blog post was written a long time ago and might be no longer relevant.

Textile is a simple markup language. It's used in CMS and wiki implementations (i.e. Redmine). I also like to use it while making notes in a plain text files.

Textile plugin for vim adds support for syntax highlighting, preview and html conversion of Textile documents.

Textile plugin in vim


If you plan to use preview or html conversion you'll need ruby:

sudo aptitude install ruby libredcloth-ruby

In case you only need syntax highlighting you can skip it.

The plugin

Get the source and unpack it to your ~/.vim directory. Detailed installation instructions are available on the plugin page.

I prefer to use textile with txt files. To tell vim that it should treat txt files as Textile add the following line to your ~/.vim/ftdetect/txt.vim:

au BufRead,BufNewFile *.txt     set filetype=textile