From 9602f763a42a4805b49661c75a8f605a9c47b043 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 4 Feb 2025 09:32:06 +0300 Subject: [PATCH] Scissors --- autoload/codecomm.vim | 7 +++++-- syntax/codecomm.vim | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autoload/codecomm.vim b/autoload/codecomm.vim index ab3fcb3..7f2560f 100644 --- a/autoload/codecomm.vim +++ b/autoload/codecomm.vim @@ -2,7 +2,7 @@ vim9script const SHA1Len = 40 const SHA256Len = 64 -const Separator = "---------------------------------- >8 ----------------------------------" +const Separator = "--8<----------------------------------------------------------------8<--" export def Do(firstline: number, lastline: number, gitDir: string) if bufwinnr("CodeCommCommenting") != -1 @@ -35,7 +35,10 @@ export def Do(firstline: number, lastline: number, gitDir: string) else header = add(header, path) endif - var ready = [printf("-----#%2d [ %54S ]-----", g:codecomm_ctr_, join(header, " "))] + var ready = [printf("--8<--[ %56S ]--8<--", join(header, " "))] + if !exists("g:codecommNoCtr") + ready = [printf("--8<--#%2d [ %52S ]--8<--", g:codecomm_ctr_, join(header, " "))] + endif # Collect enumerated selected code block's lines var fmted: string diff --git a/syntax/codecomm.vim b/syntax/codecomm.vim index eca42cd..dc51056 100644 --- a/syntax/codecomm.vim +++ b/syntax/codecomm.vim @@ -1,2 +1,2 @@ -syntax region CCBlock start=/^-\{5}#/ end=/^-\+ >8 -\+/ +syntax region CCBlock start=/^--8<--/ end=/^--8<-\+--8<--/ highlight link CCBlock Statement -- 2.48.1