vim: filetype .page as .html
Kevin Godby
godbyk at gmail.com
Sat May 18 17:45:02 UTC 2013
Hello, John.
On Sat, May 18, 2013 at 11:19 AM, John Kim <johnkim.ubuntu at gmail.com> wrote:
> I use vim for text editing. Been using it for homework lately, but I'm not
> good at scripting.
>
> The .page files in ~/ubuntu-doc/ubuntu-help/C are all in html, but since the
> filetype is .page, Vim doesn't recognize it and cannot provide a color
> syntax. However, with a bit of scripting, I can make Vim recognize .page as
> an html file and get some color. Better on the eyes too.
>
> I intend to start reviewing once I can read. If anyone here uses vim and
> can help me out, what should I add on my .vimrc to allow this?
I added the following lines to my .vimrc file:
" For Ubuntu docs
autocmd BufNewFile,BufRead *.page setfiletype mallard
And then use the Mallard vim plugin from
<https://github.com/jhradilek/vim-mallard>.
If you don't want to use the Mallard vim plugin, change 'setfiletype
mallard' to 'setfiletype html' in the .vimrc line.
If you have further questions about how to set this up, please contact
me off-list as it's a bit off-topic for the ubuntu-doc mailing list.
Thanks!
—Kevin
More information about the ubuntu-doc
mailing list