@@ -99,8 +99,6 @@ export def Surround(pre: string, post: string, text_object: string = '')
9999 endif
100100enddef
101101
102-
103-
104102export def FormatWithoutMoving (a: number = 0 , b: number = 0 )
105103 var view = winsaveview ()
106104 if a == 0 && b == 0
@@ -123,10 +121,8 @@ export def FormatWithoutMoving(a: number = 0, b: number = 0)
123121 endif
124122 endif
125123 winrestview (view )
126-
127124enddef
128125
129-
130126export def RemoveSurrounding (A: string , B: string , lead: number , trail: number )
131127 # Remove ' lead' chars from before mark ' A and ' trail' chars after mark ' B
132128 if line (A) == line (B)
@@ -350,6 +346,7 @@ export def GetTextBetweenMarks(A: string, B: string): list<string>
350346enddef
351347
352348export def InsertLinesAtMark (marker: string , lines : list <string> )
349+ # ----- NOT WORKING ----------------------
353350 var pos = getpos (marker) # Get (line , column) position of the marker
354351 var line_num = pos[1 ] # Line number
355352 var col = pos[2 ] # Column number
@@ -541,7 +538,7 @@ export def DeleteTextBetweenMarks(A: string, B: string): string
541538 # instead of 'a to jump to the exact marker position
542539 var exact_A = substitute (A, " '" , " `" , " " )
543540 var exact_B = substitute (B, " '" , " `" , " " )
544- execute $ ' norm! {exact_A}v{exact_B}d _ '
541+ execute $ ' norm! {exact_A}v{exact_B}"_d '
545542 # This to get rid off E1186
546543 return ' '
547544enddef
0 commit comments