From 2d7dd4ac40d13742a22004c36cebddf4530c78ab Mon Sep 17 00:00:00 2001 From: Ulyssa Date: Tue, 6 Jul 2021 20:49:11 -0700 Subject: [PATCH] Automatically insert comment leaders (*) for multi-line comments --- ftplugin/ats.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ftplugin/ats.vim b/ftplugin/ats.vim index 24383cc..5c92794 100644 --- a/ftplugin/ats.vim +++ b/ftplugin/ats.vim @@ -16,6 +16,12 @@ if !exists('g:ats_autoformat') endif endif +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal fo-=t fo+=croql + +setlocal comments=sr:/*,mb:*,ex:*/,sr:(*,mb:*,ex:*) + " indentation rules set smarttab augroup ats