On Wed, Sep 7, 2011 at 9:48 AM, Peng Yu <[email protected]> wrote:
> On Tue, Sep 6, 2011 at 7:19 AM, Taylor Hedberg <[email protected]> wrote:
>> You may have already tried this, but since JSON is just a subset of
>> JavaScript syntax, have you tried setting 'filetype' to "javascript"?
>> That's the simplest solution that comes to mind, though I don't know
>> whether you want JSON to be indented differently than JS.
>
> Sorry to ask a naive question. How to let vim recognize .json file as
> .javascript by default? Should I create a .vim file in ftplugin or
> somewhere? Would you please show me the details?
You can have this in your .vimrc:
autocmd BufNewFile,BufRead *.json setf javascript
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php