mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:40:06 +08:00
fix(toml): fix toml json preview plugin
This commit is contained in:
parent
0e9127e4dc
commit
8be152b48b
@ -21,13 +21,13 @@ function! toml#preview() abort
|
|||||||
" close other windows
|
" close other windows
|
||||||
silent only
|
silent only
|
||||||
" open preview windows
|
" open preview windows
|
||||||
rightbelow vsplit __toml_json_preview__
|
rightbelow vsplit __toml_json_preview__.json
|
||||||
set ft=SpaceVimTomlViewer
|
set ft=SpaceVimTomlViewer
|
||||||
set syntax=json
|
|
||||||
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonu norelativenumber winfixwidth
|
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonu norelativenumber winfixwidth
|
||||||
let s:preview_bufnr = bufnr()
|
let s:preview_bufnr = bufnr()
|
||||||
setlocal modifiable
|
setlocal modifiable
|
||||||
call setline(1, json)
|
call setline(1, json)
|
||||||
Neoformat! json
|
silent Neoformat! json
|
||||||
setlocal nomodifiable
|
setlocal nomodifiable
|
||||||
|
set syntax=json
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user