Skip to content

Commit fccf990

Browse files
committed
Remove local prefix 'l:' from let assignments.
1 parent d9c33fd commit fccf990

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

Diff for: autoload/EasyMotion.vim

+8-8
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ function! EasyMotion#WB(visualmode, direction) " {{{
181181
endfunction " }}}
182182
function! EasyMotion#WBW(visualmode, direction) " {{{
183183
let s:current.is_operator = mode(1) ==# 'no' ? 1: 0
184-
let l:regex_without_file_ends = '\v(^|\s)\zs\S|^$'
185-
let l:regex = l:regex_without_file_ends
184+
let regex_without_file_ends = '\v(^|\s)\zs\S|^$'
185+
let regex = l:regex_without_file_ends
186186
\ . (a:direction == 1 ? '' : '|%$')
187187
\ . (a:direction == 0 ? '' : '|%^')
188188
call s:EasyMotion(l:regex, a:direction, a:visualmode ? visualmode() : '', 0)
@@ -191,8 +191,8 @@ endfunction " }}}
191191
function! EasyMotion#WBK(visualmode, direction) " {{{
192192
" vim's iskeyword style word motion
193193
let s:current.is_operator = mode(1) ==# 'no' ? 1: 0
194-
let l:regex_without_file_ends = '\v<|^\S|\s\zs\S|>\zs\S|^$'
195-
let l:regex = l:regex_without_file_ends
194+
let regex_without_file_ends = '\v<|^\S|\s\zs\S|>\zs\S|^$'
195+
let regex = l:regex_without_file_ends
196196
\ . (a:direction == 1 ? '' : '|%$')
197197
\ . (a:direction == 0 ? '' : '|%^')
198198
call s:EasyMotion(l:regex, a:direction, a:visualmode ? visualmode() : '', 0)
@@ -210,8 +210,8 @@ function! EasyMotion#EW(visualmode, direction) " {{{
210210
" Note: The stopping positions for 'E' and 'gE' differs. Thus, the regex
211211
" for direction==2 cannot be the same in both directions. This will be
212212
" ignored.
213-
let l:regex_stub = '\v\S(\s|$)'
214-
let l:regex = l:regex_stub
213+
let regex_stub = '\v\S(\s|$)'
214+
let regex = l:regex_stub
215215
\ . (a:direction == 0 ? '' : '|^$|%^')
216216
\ . (a:direction == 1 ? '' : '|%$')
217217
call s:EasyMotion(l:regex, a:direction, a:visualmode ? visualmode() : '', 0)
@@ -224,8 +224,8 @@ function! EasyMotion#EK(visualmode, direction) " {{{
224224
" Note: The stopping positions for 'e' and 'ge' differs. Thus, the regex
225225
" for direction==2 cannot be the same in both directions. This will be
226226
" ignored.
227-
let l:regex_stub = '\v.\ze>|\S\ze\s*$|\S\ze\s|\k\zs>\S\ze|\S<'
228-
let l:regex = l:regex_stub
227+
let regex_stub = '\v.\ze>|\S\ze\s*$|\S\ze\s|\k\zs>\S\ze|\S<'
228+
let regex = l:regex_stub
229229
\ . (a:direction == 0 ? '' : '|^$|%^')
230230
\ . (a:direction == 1 ? '' : '|%$')
231231
call s:EasyMotion(l:regex, a:direction, a:visualmode ? visualmode() : '', 0)

Diff for: t/compare_movements_spec.vim

+15-15
Original file line numberDiff line numberDiff line change
@@ -69,52 +69,52 @@ function! s:to_cursor.failure_message_for_should(actual, expected)
6969
Expect a:actual[1] > 0
7070
Expect a:expected[1] > 0
7171

72-
let l:line1 = getline(a:actual[0])
73-
let l:line2 = getline(a:expected[0])
72+
let line1 = getline(a:actual[0])
73+
let line2 = getline(a:expected[0])
7474
" Change char on cursor to '█'.
75-
let l:line1 = strpart(l:line1, 0, a:actual[1]-1)
75+
let line1 = strpart(l:line1, 0, a:actual[1]-1)
7676
\ . ''
7777
\ . strpart(l:line1, a:actual[1])
7878
let line2 = strpart(l:line2, 0, a:expected[1]-1)
7979
\ . ''
8080
\ . strpart(l:line2, a:expected[1])
8181
" Separation of both cases with \n would be nice, but
8282
" vim-vspec allow oneliners as return string, only.
83-
let l:msg = 'Line ' . string(a:actual[0]) . ": '" . l:line1
83+
let msg = 'Line ' . string(a:actual[0]) . ": '" . l:line1
8484
\ . "',\x09\x09 Line " . string(a:expected[0]) . ": '" . l:line2 . "'\x0a"
8585
return l:msg
8686
endfunction
8787

8888
function! CompareMovements(movement1, movement2, backward)
89-
let l:jumpmarks = [
89+
let jumpmarks = [
9090
\ [a:movement1, []],
9191
\ [a:movement2, []],
9292
\ ]
9393

9494
" Loop through current buffer in both variants {{
9595
for [l:handler, l:list] in l:jumpmarks
9696
if a:backward == 1
97-
let l:last_line = line('$')
98-
let l:last_char = len(getline(l:last_line))
97+
let last_line = line('$')
98+
let last_char = len(getline(l:last_line))
9999
call cursor(l:last_line, l:last_char)
100100
else
101101
call cursor([1,1])
102102
endif
103103

104-
let l:lastpos = [0,0]
104+
let lastpos = [0,0]
105105

106106
" Centralize line. Otherwise, Easymotion functions aborts
107107
" at the end of the (virtual) window.
108108
call TryNormal('zz')
109109
call TryNormal(l:handler)
110-
let l:curpos = getpos(".")[1:2]
110+
let curpos = getpos(".")[1:2]
111111

112112
while l:lastpos != l:curpos
113-
let l:list += [l:curpos]
114-
let l:lastpos = l:curpos
113+
let list += [l:curpos]
114+
let lastpos = l:curpos
115115
call TryNormal('zz')
116116
call TryNormal(l:handler)
117-
let l:curpos = getpos(".")[1:2]
117+
let curpos = getpos(".")[1:2]
118118
" Abort after a fixed number of steps.
119119
if len(l:list) > s:maximal_number_of_compared_movments
120120
break
@@ -131,11 +131,11 @@ function! CompareMovements(movement1, movement2, backward)
131131
endif
132132

133133
" Search for first unmatching position. {{
134-
let l:index = 0
135-
let l:len = min([len(l:cursor_positions2), len(l:cursor_positions1)])
134+
let index = 0
135+
let len = min([len(l:cursor_positions2), len(l:cursor_positions1)])
136136
while l:index < l:len
137137
Expect l:cursor_positions2[l:index] to_cursor l:cursor_positions1[l:index]
138-
let l:index += 1
138+
let index += 1
139139
endwhile
140140

141141
" Collision with begin or end of file or while loop aborts to early.

0 commit comments

Comments
 (0)