mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-13 05:53:50 -05:00
Add hcl support, closes #403
This commit is contained in:
41
ftplugin/hcl.vim
Normal file
41
ftplugin/hcl.vim
Normal file
@@ -0,0 +1,41 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'hcl') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" File: ftplugin/hcl.vim
|
||||
" Author: BABAROT <b4b4r07@gmail.com>
|
||||
" Description: FileType Plugin for HCL
|
||||
" Last Change: Nob 05, 2015
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Add NERDCommenter delimiters
|
||||
|
||||
let s:delims = { 'left': '#' }
|
||||
if exists('g:NERDDelimiterMap')
|
||||
if !has_key(g:NERDDelimiterMap, 'hcl')
|
||||
let g:NERDDelimiterMap.hcl = s:delims
|
||||
endif
|
||||
elseif exists('g:NERDCustomDelimiters')
|
||||
if !has_key(g:NERDCustomDelimiters, 'hcl')
|
||||
let g:NERDCustomDelimiters.hcl = s:delims
|
||||
endif
|
||||
else
|
||||
let g:NERDCustomDelimiters = { 'hcl': s:delims }
|
||||
endif
|
||||
unlet s:delims
|
||||
|
||||
let b:undo_ftplugin = ""
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sw=4 ts=4:
|
||||
@@ -1,5 +0,0 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'tmux') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal commentstring=#\ %s
|
||||
Reference in New Issue
Block a user