Syntax highlighting in vim for .ttl files

Fed up with plain black on white text when editing in vim?  I was, but not now!

Did you know Turtle syntax is really a subset of a broader syntax called Notation3?  I didn’t, but I do now! (proof at ).

There’s an N3 syntax highlighter for vim at .

Just download the v1.1 file and put it in ~/.vim/syntax (you might need to make that directory) and then add the following to ~/.vim/filetype.vim

" RDF Notation 3 Syntax
augroup filetypedetect
au BufNewFile,BufRead *.n3  setfiletype n3
au BufNewFile,BufRead *.ttl  setfiletype n3
augroup END


(yes, including that spurious looking quotation mark at the beginning).


Comments are closed.