Sorry Marc to answer quite times after..
I have solved my need by pure VimL autocommand and vim9 func.
autocmd BufEnter *.json g:FormatJson()
def g:FormatJson() # {{{
if ( line('$') == 1 ) # when json is not expanded
silent! :%s/\("\w\+":\)\({\|\("[^"]\+"\(}*,\)\)\)/\1 \2/g
> Thank you Paul, I don't want third part.
you mean you want a pure viml solution? what's the point?
regards,
marc
--
--
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
Thank you Paul, I don't want third part.
N
Le samedi 7 mai 2022 à 18:56:56 UTC+2, Paul a écrit :
> json_pp, or: perl -MJSON -0e 'print to_json decode_json(<>),{pretty=>1}'
>
> Use {pretty=>1,canonical=>1} if you want sorted keys.
>
> On Sat, May 07, 2022 at 04:01:55AM -0700, Ni Va wrote:
> >Hi,
json_pp, or: perl -MJSON -0e 'print to_json decode_json(<>),{pretty=>1}'
Use {pretty=>1,canonical=>1} if you want sorted keys.
On Sat, May 07, 2022 at 04:01:55AM -0700, Ni Va wrote:
Hi,
How can i format inline json file to multines without python tool ?
Thank you
--
--
You received this
Hi,
How can i format inline json file to multines without python tool ?
Thank you
--
--
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
---
You received