From 8be152b48b97a9cfcb93d155a76f092d484d2f29 Mon Sep 17 00:00:00 2001 From: Shidong Wang Date: Sat, 13 Nov 2021 15:05:04 +0800 Subject: [PATCH] fix(toml): fix toml json preview plugin --- bundle/vim-toml/autoload/toml.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundle/vim-toml/autoload/toml.vim b/bundle/vim-toml/autoload/toml.vim index 6e1640ec9..f9593c0aa 100644 --- a/bundle/vim-toml/autoload/toml.vim +++ b/bundle/vim-toml/autoload/toml.vim @@ -21,13 +21,13 @@ function! toml#preview() abort " close other windows silent only " open preview windows - rightbelow vsplit __toml_json_preview__ + rightbelow vsplit __toml_json_preview__.json set ft=SpaceVimTomlViewer - set syntax=json setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonu norelativenumber winfixwidth let s:preview_bufnr = bufnr() setlocal modifiable call setline(1, json) - Neoformat! json + silent Neoformat! json setlocal nomodifiable + set syntax=json endfunction