Open europarl-data opened 5 years ago
Please test with the latest version 396e829 (which was just uploaded). Note, according to this comment we don't have an active json syntax file maintainer currently. It would help, if someone would volunteer maintaining (hint)
Describe the bug My json file (https://github.com/europeelects/europarl-national-election-systems/blob/master/references_for_laws.json) is folded in a different way by vim than on http://jsonviewer.stack.hu/. My json file is an array on its top level; consisting of 8 objects (index 0 - 7). But somehow, vim does not recognise the last and second-last object in this array. Instead, vim incorrectly inserts the last (index 7) and second-last (index 6) object into the third-last object (index 5), making my array only 6 objects (index 0 - 5) long.
To Reproduce - in vim:
vim --clean
:edit references_for_laws.json
(from https://github.com/europeelects/europarl-national-election-systems/blob/master/references_for_laws.json):set filetype=json
:syntax on
:set foldmethod=syntax
zo
=> result: vim shows only 6 lines / 6 objects:Expected behavior: see http://jsonviewer.stack.hu/
Environment
vim --version
:VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41) Inklusive der Patches: 1-1453 Verändert von pkg-vim-maintainers@lists.alioth.debian.org Übersetzt von pkg-vim-maintainers@lists.alioth.debian.org Riesige Version ohne GUI. Ein- (+) oder ausschließlich (-) der Eigenschaften: +acl +farsi +mouse_sgr -tag_any_white +arabic +file_in_path -mouse_sysmouse -tcl +autocmd +find_in_path +mouse_urxvt +termguicolors -autoservername +float +mouse_xterm +terminal -balloon_eval +folding +multi_byte +terminfo +balloon_eval_term -footer +multi_lang +termresponse -browse +fork() -mzscheme +textobjects ++builtin_terms +gettext +netbeans_intg +timers +byte_offset -hangul_input +num64 +title +channel +iconv +packages -toolbar +cindent +insert_expand +path_extra +user_commands -clientserver +job -perl +vertsplit -clipboard +jumplist +persistent_undo +virtualedit +cmdline_compl +keymap +postscript +visual +cmdline_hist +lambda +printer +visualextra +cmdline_info +langmap +profile +viminfo +comments +libcall -python +vreplace +conceal +linebreak +python3 +wildignore +cryptv +lispindent +quickfix +wildmenu +cscope +listcmds +reltime +windows +cursorbind +localmap +rightleft +writebackup +cursorshape -lua -ruby -X11 +dialog_con +menu +scrollbind -xfontset +diff +mksession +signs -xim +digraphs +modify_fname +smartindent -xpm -dnd +mouse +startuptime -xsmp -ebcdic -mouseshape +statusline -xterm_clipboard +emacs_tags +mouse_dec -sun_workshop -xterm_save +eval +mouse_gpm +syntax +ex_extra -mouse_jsbterm +tag_binary +extra_search +mouse_netterm +tag_old_static System-vimrc-Datei: "$VIM/vimrc" Benutzer-vimrc-Datei: "$HOME/.vimrc" zweite Benutzer-vimrc-Datei: "~/.vim/vimrc" Benutzer-exrc-Datei: "$HOME/.exrc" defaults Datei: "$VIMRUNTIME/defaults.vim" Voreinstellung für $VIM: "/usr/share/vim" Übersetzt: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-8l5tlu/vim-8.0.1453=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linken: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm
uname -a
:Linux hp-pav-ts-15-limint 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux