From 8b3418cab8eb5267b3a5743e4d5fe5f698d48bc8 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 27 Sep 2017 19:57:29 +0200 Subject: Update --- after/ftplugin/jsx.vim | 2 +- after/ftplugin/terraform.vim | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'after/ftplugin') diff --git a/after/ftplugin/jsx.vim b/after/ftplugin/jsx.vim index fc76b19e..a5682895 100644 --- a/after/ftplugin/jsx.vim +++ b/after/ftplugin/jsx.vim @@ -12,7 +12,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1 if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = '(:),\[:\],{:},<:>,' . - \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' + \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(/\@\|$\):<\@<=/\1>' endif setlocal suffixesadd+=.jsx diff --git a/after/ftplugin/terraform.vim b/after/ftplugin/terraform.vim index add09445..0597b428 100644 --- a/after/ftplugin/terraform.vim +++ b/after/ftplugin/terraform.vim @@ -4,6 +4,10 @@ if !exists('g:terraform_align') let g:terraform_align = 0 endif +if !exists('g:terraform_remap_spacebar') + let g:terraform_remap_spacebar = 0 +endif + if g:terraform_align && exists(':Tabularize') inoremap = =:call terraformalign()a function! s:terraformalign() @@ -31,6 +35,10 @@ function! TerraformFolds() return ">1" elseif match(thisline, '^output') >= 0 return ">1" + elseif match(thisline, '^data') >= 0 + return ">1" + elseif match(thisline, '^terraform') >= 0 + return ">1" else return "=" endif @@ -45,10 +53,13 @@ function! TerraformFoldText() endfunction setlocal foldtext=TerraformFoldText() -"inoremap za -nnoremap za -onoremap za -vnoremap zf +" Re-map the space bar to fold and unfold +if get(g:, "terraform_remap_spacebar", 1) + "inoremap za + nnoremap za + onoremap za + vnoremap zf +endif " Match the identation put in place by Hashicorp and :TerraformFmt, https://github.com/hashivim/vim-terraform/issues/21 if get(g:, "terraform_align", 1) -- cgit v1.2.3