From a4172077f15a2744cd9aef56db06cff9322b0c6f Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 9 Jun 2025 08:30:30 +0100 Subject: [PATCH] etc/vim/source/map.vim --- etc/vim/source/map.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etc/vim/source/map.vim b/etc/vim/source/map.vim index 85b3e3f5..bb1245de 100644 --- a/etc/vim/source/map.vim +++ b/etc/vim/source/map.vim @@ -52,6 +52,7 @@ func! CommentSubSpecialChar(text) let val = '' for val in a:text let a:text[i] = substitute(val,'\\n',"\n",'') + "let a:text[i] = substitute(a:text[i],'\n',"\r",'') let i += 1 endfor endfunc @@ -90,7 +91,9 @@ func! CommentToggle() endif let comment = split(comment,'\s\+') - " call CommentSubSpecialChar(comment) + " NB 09.06.25: For css + " let comment = substitute(comment,'\n','\r','g') + "call CommentSubSpecialChar(comment) let curr_line = getline('.') " @@ -102,6 +105,7 @@ func! CommentToggle() if ( len(comment)>1 ) let new_line = substitute(new_line,'\s*'.comment[1].'\s*$','','') endif + "let new_line = substitute(new_line,'\r','\n','g') if new_line == curr_line " @@ -115,7 +119,7 @@ func! CommentToggle() if ( len(comment)>1 ) let new_line = substitute(new_line,'\s*$',' '.comment[1],'') endif - " let new_line = substitute(new_line,'\\n',"\n",'') + "let new_line = substitute(new_line,'\n',"\n",'g') endif call setline('.',new_line) -- 2.47.3