Last Updated: February 25, 2016
·
4.555K
· ysulaiman

Simple JSON Syntax Highlighting in Vim

Suppose you are looking at some JSON in Vim, how can you syntax-highlight it? Should you look for a JSON plugin?

Well, you can do that, but there is a simple way: just :set ft=javascript.

As Christopher Sexton points out, Vim supports JavaScript, and that can be used to syntax-highlight JSON files.