aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/vertical_region.vim28
1 files changed, 14 insertions, 14 deletions
diff --git a/autoload/vertical_region.vim b/autoload/vertical_region.vim
index 9dd171f..1c8567d 100644
--- a/autoload/vertical_region.vim
+++ b/autoload/vertical_region.vim
@@ -7,22 +7,22 @@ function! vertical_region#Map(count, up, mode) abort
endif
" Get line and column number
- let l:num = line('.')
- let l:col = col('.')
+ let num = line('.')
+ let col = col('.')
" Move up or down through buffer, counting hits as we go
- let l:hits = 0
- while a:up ? l:num > 1 : l:num < line('$')
+ let hits = 0
+ while a:up ? num > 1 : num < line('$')
" Increment or decrement line number
- let l:num += a:up ? -1 : 1
+ let num += a:up ? -1 : 1
" If the line has any non-space characters up to the current column, we
" have a hit; break the loop as soon as we have the count we need
- let l:line = getline(l:num)
- if strpart(l:line, 0, l:col) =~# '\S'
- let l:hits += 1
- if l:hits == a:count
+ let line = getline(num)
+ if strpart(line, 0, col) =~# '\S'
+ let hits += 1
+ if hits == a:count
break
endif
endif
@@ -31,14 +31,14 @@ function! vertical_region#Map(count, up, mode) abort
" If not moving linewise for operator mode and not in first column, move to
" same column after line jump; is there a way to do this in one jump?
- let l:keys = l:num . 'G0'
+ let keys = num . 'G0'
if a:mode ==# 'o'
- let l:keys = 'V' . l:keys
- elseif l:col > 1
- let l:keys .= l:col - 1 . 'l'
+ let keys = 'V' . keys
+ elseif col > 1
+ let keys .= col - 1 . 'l'
endif
" Run normal mode commands
- execute 'normal! ' . l:keys
+ execute 'normal! ' . keys
endfunction