summaryrefslogtreecommitdiffstats
path: root/ftplugin/Dockerfile.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-09-04 15:44:43 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2019-09-04 15:44:43 +0200
commit664aa988f6d9cdb7b75218666fbe348c85ef8b29 (patch)
tree306173199576430e6133a1ed137bd80bbc2fb01b /ftplugin/Dockerfile.vim
parent3ddca5da461ebfaa82104f82e3cbf19d1c326ade (diff)
downloadvim-polyglot-664aa988f6d9cdb7b75218666fbe348c85ef8b29.tar.gz
vim-polyglot-664aa988f6d9cdb7b75218666fbe348c85ef8b29.zip
Update
Diffstat (limited to 'ftplugin/Dockerfile.vim')
-rw-r--r--ftplugin/Dockerfile.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/ftplugin/Dockerfile.vim b/ftplugin/Dockerfile.vim
index 909739aa..977be845 100644
--- a/ftplugin/Dockerfile.vim
+++ b/ftplugin/Dockerfile.vim
@@ -2,6 +2,12 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'dockerfile') !=
finish
endif
+" Define comment string
+setlocal commentstring=#\ %s
+
+" Enable automatic comment insertion
+setlocal formatoptions+=cro
+
function! DockerfileReplaceInstruction(original, replacement)
let syn = synIDtrans(synID(line("."), col(".") - 1, 0))
if syn != hlID("Comment") && syn != hlID("Constant") && strlen(getline(".")) == 0