This commit is contained in:
Adam Stankiewicz
2019-09-04 15:44:43 +02:00
parent 3ddca5da46
commit 664aa988f6
49 changed files with 1663 additions and 1512 deletions

View File

@@ -26,25 +26,14 @@ if !has('patch-7.4.1142')
endif
if get(g:, 'terraform_fold_sections', 0)
setlocal foldmethod=expr
setlocal foldexpr=terraform#folds()
setlocal foldlevel=1
setlocal foldtext=terraform#foldText()
let b:undo_ftplugin .= ' foldmethod< foldexpr< foldlevel< foldtext<'
setlocal foldmethod=syntax
let b:undo_ftplugin .= ' foldmethod<'
endif
" Set the commentstring
let &l:commentstring = get(g:, 'terraform_commentstring', '#%s')
setlocal commentstring=#%s
let b:undo_ftplugin .= ' commentstring<'
" Re-map the space bar to fold and unfold
if get(g:, 'terraform_remap_spacebar', 0)
nnoremap <buffer> <space> za
onoremap <buffer> <space> <C-C>za
vnoremap <buffer> <space> zf
let b:undo_ftplugin .= '|unmap <buffer> <space>'
endif
if get(g:, 'terraform_align', 0) && exists(':Tabularize')
inoremap <buffer> <silent> = =<Esc>:call terraform#align()<CR>a
let b:undo_ftplugin .= '|iunmap <buffer> ='