From: Nicolas Boisselier Date: Mon, 9 Jun 2025 07:30:30 +0000 (+0100) Subject: etc/vim/source/map.vim X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=a4172077f15a2744cd9aef56db06cff9322b0c6f;p=nb.git etc/vim/source/map.vim --- 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)