1. Audrius Kažukauskas
  2. dotvim

Commits

Audrius Kažukauskas  committed b2f3ede

Use JSON syntax script as a bundle

  • Participants
  • Parent commits 0507649
  • Branches default

Comments (0)

Files changed (7)

File .hgsub

View file
  • Ignore whitespace
 bundle/gundo              = [hg]https://bitbucket.org/sjl/gundo.vim
 bundle/javascript         = [git]https://github.com/pangloss/vim-javascript
 bundle/jinja              = [git]https://github.com/mitsuhiko/vim-jinja
+bundle/json               = [git]https://github.com/elzr/vim-json
 bundle/less               = [git]https://github.com/groenewege/vim-less
 bundle/mdx                = [git]https://github.com/findango/vim-mdx
 bundle/misc               = [git]https://github.com/xolox/vim-misc

File .hgsubstate

View file
  • Ignore whitespace
 eb9fc8676b8959c3c2c95bf6b6e8f0f44317c5c0 bundle/gundo
 f8122fd1caca68b2592553e43dad45b3dc445a06 bundle/javascript
 8a8f0ed97c1751d304cf5b7241f2fe27b0e61f81 bundle/jinja
+239332a65b24cea376ae68a8a3727d82e9f88b05 bundle/json
 5d965c221b90fb168bf9f447a332c9ff6f62e666 bundle/less
 2cce8a9c62b368dab94ed58ac097bf8dd323b9c0 bundle/mdx
 8551f2b9dec7fd17dd5c3476d7869957185d692d bundle/misc

File ftdetect/jshintrc.vim

View file
  • Ignore whitespace
+au BufNewFile,BufRead .jshintrc set ft=json

File ftdetect/json.vim

  • Ignore whitespace
-au BufNewFile,BufRead *.json set ft=json

File ftplugin/json.vim

View file
  • Ignore whitespace
+javascript.vim

File syntax/json.vim

  • Ignore whitespace
-" Vim syntax file
-" Language:	JSON
-" Maintainer:	Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
-" Last Change:	2009-06-16
-" Version:      0.4
-" {{{1
-
-" Syntax setup {{{2
-" For version 5.x: Clear all syntax items
-" For version 6.x: Quit when a syntax file was already loaded
-
-if !exists("main_syntax")
-  if version < 600
-    syntax clear
-  elseif exists("b:current_syntax")
-    finish
-  endif
-  let main_syntax = 'json'
-endif
-
-" Syntax: Strings {{{2
-syn region  jsonString    start=+"+  skip=+\\\\\|\\"+  end=+"+  contains=jsonEscape
-" Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
-syn region  jsonStringSQ  start=+'+  skip=+\\\\\|\\"+  end=+'+
-
-" Syntax: Escape sequences {{{3
-syn match   jsonEscape    "\\["\\/bfnrt]" contained
-syn match   jsonEscape    "\\u\x\{4}" contained
-
-" Syntax: Strings should always be enclosed with quotes.
-syn match   jsonNoQuotes  "\<\a\+\>"
-
-" Syntax: Numbers {{{2
-syn match   jsonNumber    "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>"
-
-" Syntax: An integer part of 0 followed by other digits is not allowed.
-syn match   jsonNumError  "-\=\<0\d\.\d*\>"
-
-" Syntax: Boolean {{{2
-syn keyword jsonBoolean   true false
-
-" Syntax: Null {{{2
-syn keyword jsonNull      null
-
-" Syntax: Braces {{{2
-syn match   jsonBraces	   "[{}\[\]]"
-
-" Define the default highlighting. {{{1
-" For version 5.7 and earlier: only when not done already
-" For version 5.8 and later: only when an item doesn't have highlighting yet
-if version >= 508 || !exists("did_json_syn_inits")
-  if version < 508
-    let did_json_syn_inits = 1
-    command -nargs=+ HiLink hi link <args>
-  else
-    command -nargs=+ HiLink hi def link <args>
-  endif
-  HiLink jsonString             String
-  HiLink jsonEscape             Special
-  HiLink jsonNumber		Number
-  HiLink jsonBraces		Operator
-  HiLink jsonNull		Function
-  HiLink jsonBoolean		Boolean
-
-  HiLink jsonNumError           Error
-  HiLink jsonStringSQ           Error
-  HiLink jsonNoQuotes           Error
-  delcommand HiLink
-endif
-
-let b:current_syntax = "json"
-if main_syntax == 'json'
-  unlet main_syntax
-endif
-
-" Vim settings {{{2
-" vim: ts=8 fdm=marker

File vimrc

View file
  • Ignore whitespace
 let g:easytags_auto_update = 0
 let g:easytags_auto_highlight = 0
 
-" Simple JavaScript Indenter settings.
-let g:SimpleJsIndenter_BriefMode = 1
-let g:SimpleJsIndenter_CaseIndentLevel = -1
-
 " Set default SQL syntax to Postgres.
 let g:sql_type_default = 'pgsql'