diff options
Diffstat (limited to 'after/ftplugin')
-rw-r--r-- | after/ftplugin/jsx.vim | 2 | ||||
-rw-r--r-- | after/ftplugin/terraform.vim | 19 |
2 files changed, 16 insertions, 5 deletions
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 <buffer> <silent> = =<Esc>:call <SID>terraformalign()<CR>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 <space> <C-O>za -nnoremap <space> za -onoremap <space> <C-C>za -vnoremap <space> zf +" Re-map the space bar to fold and unfold +if get(g:, "terraform_remap_spacebar", 1) + "inoremap <space> <C-O>za + nnoremap <space> za + onoremap <space> <C-C>za + vnoremap <space> 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) |