David Barnett wrote:

> This is a patch to create a separate json filetype and use it for
> *.json files instead of using javascript. It currently just forwards
> indent and syntax settings to the javascript filetype, but it does
> define its own ftplugin/json.vim file since most of the settings in
> ftplugin/javascript.vim don't apply to JSON. I'd like to submit it to
> be integrated in vim under the Vim license.
> 
> My reasons for wanting to do this instead of just using the javascript 
> filetype are:
>   * JSON is not JavaScript, it's a very small subset of the language.
>   Comments and many other details of JavaScript syntax are completely
>   invalid in a JavaScript file, so it's misleading to treat them as
>   the same filetype.
>   * Several plugins (syntastic, vim-snippets, vim-addon-manager) refer
>   to a "json" filetype that doesn't actually exist unless you install
>   some third-party plugin to apply it. This leads to vim unexpectedly
>   triggering "javascript" actions on "json" files, and in the case of
>   vim-addon-manager means addon-info.json files aren't syntax
>   highlighted at all
>   (https://github.com/MarcWeber/vim-addon-manager/issues/163).

Thanks, I'll include it.  I'll remove the checks for pre-Vim 6.0, that's
reeeeally old.

-- 
Violators can be fined, arrested or jailed for making ugly faces at a dog.
                [real standing law in Oklahoma, United States of America]

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui