diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2017-09-27 19:57:29 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2017-09-27 19:57:29 +0200 |
commit | 8b3418cab8eb5267b3a5743e4d5fe5f698d48bc8 (patch) | |
tree | 125734ac66307a962eeda16283355dde0d0fbd2e /after/ftplugin | |
parent | 9bfde7574aa89a91b80ed9c993fc000cfc11aae7 (diff) | |
download | vim-polyglot-8b3418cab8eb5267b3a5743e4d5fe5f698d48bc8.tar.gz vim-polyglot-8b3418cab8eb5267b3a5743e4d5fe5f698d48bc8.zip |
Update
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) |