@@ -90,7 +90,7 @@ endfunction
90
90
" }}}1
91
91
" Normal Mode {{{1
92
92
93
- function ! s: increment (increment)
93
+ function ! speeddating# increment (increment)
94
94
for handler in s: time_handlers + g: speeddating_handlers
95
95
let pattern = type (handler.regexp) == type (function (' tr' )) ? handler.regexp () : handler.regexp
96
96
let [start ,end ,string ;caps] = s: findinline (' \C' .pattern)
@@ -167,7 +167,7 @@ function! s:incrementstring(string,offset,count)
167
167
return [repl,offset,start ,end ]
168
168
endfunction
169
169
170
- function ! s: incrementvisual (count )
170
+ function ! speeddating# incrementvisual (count )
171
171
let ve = &ve
172
172
set virtualedit = all
173
173
exe " norm! gv\<Esc> "
@@ -549,7 +549,7 @@ let s:strftime_items = {
549
549
" }}}1
550
550
" Time Handler {{{1
551
551
552
- function ! s: timestamp (utc,count )
552
+ function ! speeddating# timestamp (utc,count )
553
553
for handler in s: time_handlers
554
554
let [start ,end ,string ;caps] = s: findinline (' \C' .join (handler.groups,' ' ))
555
555
if string != " "
@@ -736,7 +736,7 @@ function! s:comparecase(i1, i2)
736
736
endif
737
737
endfunction
738
738
739
- function ! s: adddate (master,count ,bang )
739
+ function ! speeddating# adddate (master,count ,bang )
740
740
if a: master == " "
741
741
let time = s: initializetime ({' y' :1970 ,' s' : localtime (),' z' : ' UTC' })
742
742
if a: bang && a: count
@@ -790,7 +790,7 @@ endfunction
790
790
791
791
let s: time_handlers = []
792
792
793
- command ! - bar - bang -count =0 -nargs =? SpeedDatingFormat :call s: adddate (<q-args> ,<count> ,<bang> 0 )
793
+ command ! - bar - bang -count =0 -nargs =? SpeedDatingFormat :call speeddating# adddate (<q-args> ,<count> ,<bang> 0 )
794
794
795
795
" }}}1
796
796
" Default Formats {{{1
@@ -819,12 +819,12 @@ SpeedDatingFormat %v
819
819
" }}}1
820
820
" Maps {{{1
821
821
822
- nnoremap <silent> <Plug> SpeedDatingUp :<C-U> call <SID> increment(v:count1)<CR>
823
- nnoremap <silent> <Plug> SpeedDatingDown :<C-U> call <SID> increment(-v:count1)<CR>
824
- vnoremap <silent> <Plug> SpeedDatingUp :<C-U> call <SID> incrementvisual(v:count1)<CR>
825
- vnoremap <silent> <Plug> SpeedDatingDown :<C-U> call <SID> incrementvisual(-v:count1)<CR>
826
- nnoremap <silent> <Plug> SpeedDatingNowLocal :<C-U> call <SID> timestamp(0,v:count)<CR>
827
- nnoremap <silent> <Plug> SpeedDatingNowUTC :<C-U> call <SID> timestamp(1,v:count)<CR>
822
+ nnoremap <silent> <Plug> SpeedDatingUp :<C-U> call speeddating# increment(v:count1)<CR>
823
+ nnoremap <silent> <Plug> SpeedDatingDown :<C-U> call speeddating# increment(-v:count1)<CR>
824
+ vnoremap <silent> <Plug> SpeedDatingUp :<C-U> call speeddating# incrementvisual(v:count1)<CR>
825
+ vnoremap <silent> <Plug> SpeedDatingDown :<C-U> call speeddating# incrementvisual(-v:count1)<CR>
826
+ nnoremap <silent> <Plug> SpeedDatingNowLocal :<C-U> call speeddating# timestamp(0,v:count)<CR>
827
+ nnoremap <silent> <Plug> SpeedDatingNowUTC :<C-U> call speeddating# timestamp(1,v:count)<CR>
828
828
829
829
if ! exists (" g:speeddating_no_mappings" ) || ! g: speeddating_no_mappings
830
830
nmap <C-A> <Plug> SpeedDatingUp
0 commit comments