From 8916659e0e1cb67b860373f2d094445bb1f657aa Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Mon, 4 Sep 2017 11:54:46 -0600 Subject: Add custom vim filetype plugins for php and json --- base/.vim/ftplugin/json.vim | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 base/.vim/ftplugin/json.vim (limited to 'base/.vim/ftplugin/json.vim') diff --git a/base/.vim/ftplugin/json.vim b/base/.vim/ftplugin/json.vim new file mode 100644 index 0000000..3ee1062 --- /dev/null +++ b/base/.vim/ftplugin/json.vim @@ -0,0 +1,40 @@ +" Vim syntax file +" Language: JSON +" Maintainer: Eli Parra https://github.com/elzr/vim-json +" Last Change: 2014-05-20 added warning toggle + +"uncomment to enable folding of `{...}` and `[...]` blocks +"setlocal foldmethod=syntax + +"conceal by default +if !exists("g:vim_json_syntax_conceal") + let g:vim_json_syntax_conceal = 1 +end + +"have warnings by default +if !exists("g:vim_json_warnings") + let g:vim_json_warnings = 1 +end + +"set concealcursor blank by default +"this should turn off the concealing in the current line (where the cursor is at), +"on all modes (normal, visual, insert) +if !exists("g:vim_json_syntax_concealcursor") + let g:vim_json_syntax_concealcursor = "" +end + +if has('conceal') + if (g:vim_json_syntax_conceal == 1) + "level 2 means concealed text gets completely hidden unless a + "replacement is defined (none is defined by us) + setlocal conceallevel=2 + let &l:concealcursor = g:vim_json_syntax_concealcursor + else + "level 0 means text is shown normally = no concealing + setlocal conceallevel=0 + endif + "maybe g:vim_json_syntax_conceal could be settable to 0,1,2 to map + "directly to vim's conceallevels? unsure if anyone cares +endif + +setlocal foldmethod=syntax -- cgit v1.2.3-70-g09d2