1- function ! s: surroundings () abort
1+ function ! commentary# surroundings () abort
22 return split (get (b: , ' commentary_format' , substitute (substitute (
33 \ &commentstring , ' \S\zs%s' ,' %s' ,' ' ) ,' %s\ze\S' , ' %s ' , ' ' )), ' %s' , 1 )
44endfunction
@@ -21,7 +21,7 @@ function! commentary#go(type,...) abort
2121 let [lnum1, lnum2] = [line (" '[" ), line (" ']" )]
2222 endif
2323
24- let [l , r ] = s: surroundings ()
24+ let [l , r ] = commentary# surroundings ()
2525 let uncomment = 2
2626 for lnum in range (lnum1,lnum2)
2727 let line = matchstr (getline (lnum),' \S.*\s\@<!' )
@@ -55,7 +55,7 @@ function! commentary#go(type,...) abort
5555endfunction
5656
5757function ! commentary#textobject (inner) abort
58- let [l , r ] = s: surroundings ()
58+ let [l , r ] = commentary# surroundings ()
5959 let lnums = [line (' .' )+ 1 , line (' .' )-2 ]
6060 for [index , dir , bound, line ] in [[0 , -1 , 1 , ' ' ], [1 , 1 , line (' $' ), ' ' ]]
6161 while lnums[index ] != bound && line == # ' ' || ! (stridx (line ,l ) || line [strlen (line )- strlen (r ) : -1 ] != r )
0 commit comments