commit 7716dd0dd3fc8a60357ba3d00813e4a0a22dae18
parent e32ef6c7a322af1cab17758222e923341387c1bb
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Thu, 15 Nov 2018 00:35:04 +0100
vim command to simplify single member JSON objects
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vim/commands.vimrc b/vim/commands.vimrc
@@ -10,8 +10,8 @@ command! Diffc w !git diff % -
command! Fuckwindows %s/
//g
command! Hexedit %!xxd
command! Unhex %!xxd -r
+command! JsonSimplifyObject %s/^\(\s\{16}\){\n\s\{20\}\(.*\)\n\s\{16\}}\(,\?\)/\1{\2}\3
command! BeautifyJson %!python -m json.tool
-
command! -nargs=1 -complete=command Redir silent call Redir(<f-args>)
" Usage:
" :Redir hi ............. show the full output of command ':hi' in a scratch window