Merge pull request #282 from easymotion/revitalizer
introduce revitalizer!
This commit is contained in:
commit
2dad1b1661
@ -30,7 +30,7 @@ set cpo&vim
|
||||
" }}}
|
||||
|
||||
" CommandLine:
|
||||
let s:V = vital#of('easymotion')
|
||||
let s:V = vital#easymotion#of()
|
||||
let s:cmdline = s:V.import('Over.Commandline.Base')
|
||||
let s:modules = s:V.import("Over.Commandline.Modules")
|
||||
let s:search = s:cmdline.make()
|
||||
|
@ -1,4 +1,4 @@
|
||||
let s:V = vital#of('easymotion')
|
||||
let s:V = vital#easymotion#of()
|
||||
let s:HitAHintMotion = s:V.import('HitAHint.Motion')
|
||||
|
||||
call EasyMotion#init()
|
||||
|
@ -9,15 +9,14 @@ let s:cache_sid = {}
|
||||
let s:_unify_path_cache = {}
|
||||
|
||||
function! s:plugin_name() abort
|
||||
let info_file = get(split(glob(s:base_dir . '/*.vital', 1), "\n"), 0, '')
|
||||
return fnamemodify(info_file, ':t:r')
|
||||
return s:self_version[1 :]
|
||||
endfunction
|
||||
|
||||
function! s:vital_files() abort
|
||||
if !exists('s:vital_files')
|
||||
let s:vital_files =
|
||||
\ map(
|
||||
\ s:plugin_name() ==# 'vital'
|
||||
\ s:plugin_name() ==# '_latest__'
|
||||
\ ? s:_global_vital_files()
|
||||
\ : s:_self_vital_files(),
|
||||
\ 'fnamemodify(v:val, ":p:gs?[\\\\/]?/?")')
|
||||
|
127
autoload/vital/_easymotion/Data/Dict.vim
Normal file
127
autoload/vital/_easymotion/Data/Dict.vim
Normal file
@ -0,0 +1,127 @@
|
||||
" Utilities for dictionary.
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Makes a dict from keys and values
|
||||
function! s:make(keys, values, ...) abort
|
||||
let dict = {}
|
||||
let fill = a:0 ? a:1 : 0
|
||||
for i in range(len(a:keys))
|
||||
let key = type(a:keys[i]) == type('') ? a:keys[i] : string(a:keys[i])
|
||||
if key ==# ''
|
||||
throw "vital: Data.Dict: Can't use an empty string for key."
|
||||
endif
|
||||
let dict[key] = get(a:values, i, fill)
|
||||
endfor
|
||||
return dict
|
||||
endfunction
|
||||
|
||||
" Swaps keys and values
|
||||
function! s:swap(dict) abort
|
||||
return s:make(values(a:dict), keys(a:dict))
|
||||
endfunction
|
||||
|
||||
" Makes a index dict from a list
|
||||
function! s:make_index(list, ...) abort
|
||||
let value = a:0 ? a:1 : 1
|
||||
return s:make(a:list, [], value)
|
||||
endfunction
|
||||
|
||||
function! s:pick(dict, keys) abort
|
||||
let new_dict = {}
|
||||
for key in a:keys
|
||||
if has_key(a:dict, key)
|
||||
let new_dict[key] = a:dict[key]
|
||||
endif
|
||||
endfor
|
||||
return new_dict
|
||||
endfunction
|
||||
|
||||
function! s:omit(dict, keys) abort
|
||||
let new_dict = copy(a:dict)
|
||||
for key in a:keys
|
||||
if has_key(a:dict, key)
|
||||
call remove(new_dict, key)
|
||||
endif
|
||||
endfor
|
||||
return new_dict
|
||||
endfunction
|
||||
|
||||
function! s:clear(dict) abort
|
||||
for key in keys(a:dict)
|
||||
call remove(a:dict, key)
|
||||
endfor
|
||||
return a:dict
|
||||
endfunction
|
||||
|
||||
function! s:_max_by(dict, expr) abort
|
||||
let dict = s:swap(map(copy(a:dict), a:expr))
|
||||
let key = dict[max(keys(dict))]
|
||||
return [key, a:dict[key]]
|
||||
endfunction
|
||||
|
||||
function! s:max_by(dict, expr) abort
|
||||
if empty(a:dict)
|
||||
throw 'vital: Data.Dict: Empty dictionary'
|
||||
endif
|
||||
return s:_max_by(a:dict, a:expr)
|
||||
endfunction
|
||||
|
||||
function! s:min_by(dict, expr) abort
|
||||
if empty(a:dict)
|
||||
throw 'vital: Data.Dict: Empty dictionary'
|
||||
endif
|
||||
return s:_max_by(a:dict, '-(' . a:expr . ')')
|
||||
endfunction
|
||||
|
||||
function! s:_foldl(f, init, xs) abort
|
||||
let memo = a:init
|
||||
for [k, v] in a:xs
|
||||
let expr = substitute(a:f, 'v:key', string(k), 'g')
|
||||
let expr = substitute(expr, 'v:val', string(v), 'g')
|
||||
let expr = substitute(expr, 'v:memo', string(memo), 'g')
|
||||
unlet memo
|
||||
let memo = eval(expr)
|
||||
endfor
|
||||
return memo
|
||||
endfunction
|
||||
|
||||
function! s:foldl(f, init, dict) abort
|
||||
return s:_foldl(a:f, a:init, items(a:dict))
|
||||
endfunction
|
||||
|
||||
function! s:foldr(f, init, dict) abort
|
||||
return s:_foldl(a:f, a:init, reverse(items(a:dict)))
|
||||
endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim:set et ts=2 sts=2 sw=2 tw=0:
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'clear': s:___revitalizer_function___('s:clear'),'foldl': s:___revitalizer_function___('s:foldl'),'foldr': s:___revitalizer_function___('s:foldr'),'make': s:___revitalizer_function___('s:make'),'make_index': s:___revitalizer_function___('s:make_index'),'max_by': s:___revitalizer_function___('s:max_by'),'min_by': s:___revitalizer_function___('s:min_by'),'omit': s:___revitalizer_function___('s:omit'),'pick': s:___revitalizer_function___('s:pick'),'swap': s:___revitalizer_function___('s:swap')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Data#Dict#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
@ -440,3 +440,29 @@ let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim:set et ts=2 sts=2 sw=2 tw=0:
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'all': s:___revitalizer_function___('s:all'),'and': s:___revitalizer_function___('s:and'),'any': s:___revitalizer_function___('s:any'),'binary_search': s:___revitalizer_function___('s:binary_search'),'break': s:___revitalizer_function___('s:break'),'char_range': s:___revitalizer_function___('s:char_range'),'clear': s:___revitalizer_function___('s:clear'),'combinations': s:___revitalizer_function___('s:combinations'),'concat': s:___revitalizer_function___('s:concat'),'conj': s:___revitalizer_function___('s:conj'),'cons': s:___revitalizer_function___('s:cons'),'find': s:___revitalizer_function___('s:find'),'find_index': s:___revitalizer_function___('s:find_index'),'find_indices': s:___revitalizer_function___('s:find_indices'),'find_last_index': s:___revitalizer_function___('s:find_last_index'),'flatten': s:___revitalizer_function___('s:flatten'),'foldl': s:___revitalizer_function___('s:foldl'),'foldl1': s:___revitalizer_function___('s:foldl1'),'foldr': s:___revitalizer_function___('s:foldr'),'foldr1': s:___revitalizer_function___('s:foldr1'),'group_by': s:___revitalizer_function___('s:group_by'),'has': s:___revitalizer_function___('s:has'),'has_common_items': s:___revitalizer_function___('s:has_common_items'),'has_index': s:___revitalizer_function___('s:has_index'),'intersect': s:___revitalizer_function___('s:intersect'),'map_accum': s:___revitalizer_function___('s:map_accum'),'max_by': s:___revitalizer_function___('s:max_by'),'min_by': s:___revitalizer_function___('s:min_by'),'or': s:___revitalizer_function___('s:or'),'partition': s:___revitalizer_function___('s:partition'),'permutations': s:___revitalizer_function___('s:permutations'),'pop': s:___revitalizer_function___('s:pop'),'product': s:___revitalizer_function___('s:product'),'push': s:___revitalizer_function___('s:push'),'shift': s:___revitalizer_function___('s:shift'),'sort': s:___revitalizer_function___('s:sort'),'sort_by': s:___revitalizer_function___('s:sort_by'),'span': s:___revitalizer_function___('s:span'),'take_while': s:___revitalizer_function___('s:take_while'),'uniq': s:___revitalizer_function___('s:uniq'),'uniq_by': s:___revitalizer_function___('s:uniq_by'),'unshift': s:___revitalizer_function___('s:unshift'),'with_index': s:___revitalizer_function___('s:with_index'),'zip': s:___revitalizer_function___('s:zip'),'zip_fill': s:___revitalizer_function___('s:zip_fill')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Data#List#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -267,3 +267,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'frozenset': s:___revitalizer_function___('s:frozenset'),'set': s:___revitalizer_function___('s:set')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Data#Set#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -109,3 +109,29 @@ function! s:_keys_count(targets_len, keys_len) abort
|
||||
exe s:assert('len(_keys_count) is# a:keys_len')
|
||||
return _keys_count
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'create': s:___revitalizer_function___('s:create')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#HitAHint#Hint#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -72,7 +72,7 @@ let s:overwin = {
|
||||
\ 'cursor': 'HitAHintCursor',
|
||||
\ },
|
||||
\ 'jump_first_target_keys': [],
|
||||
\ 'do_shade': s:TRUE,
|
||||
\ 'do_shade': s:FALSE,
|
||||
\ }
|
||||
\ }
|
||||
|
||||
@ -539,11 +539,10 @@ function! s:Hinter._show_hint_for_line(winnr, lnum, col2hint) abort
|
||||
let is_consecutive = cnum is# prev_cnum + 1
|
||||
if !is_consecutive
|
||||
let col_num += next_offset
|
||||
else
|
||||
let save_next_offset = next_offset
|
||||
endif
|
||||
let save_next_offset = next_offset
|
||||
|
||||
let [line, offset, next_offset] = self._replace_line_for_hint(a:lnum, col_num, line, hint)
|
||||
let [line, offset, next_offset] = self._replace_line_for_hint(col_num, line, hint)
|
||||
|
||||
if is_consecutive
|
||||
let col_offset += save_next_offset
|
||||
@ -570,7 +569,7 @@ endfunction
|
||||
" depends on the col number of next hint in the same line, so it returns
|
||||
" `next_offset` instead of returning offset all at once.
|
||||
" @return {(string, number, number)} (line, offset, next_offset)
|
||||
function! s:Hinter._replace_line_for_hint(lnum, col_num, line, hint) abort
|
||||
function! s:Hinter._replace_line_for_hint(col_num, line, hint) abort
|
||||
let line = a:line
|
||||
let col_num = a:col_num
|
||||
let do_replace_target = !(self.config.do_shade || s:can_preserve_syntax)
|
||||
@ -585,9 +584,9 @@ function! s:Hinter._replace_line_for_hint(lnum, col_num, line, hint) abort
|
||||
|
||||
let offset = 0
|
||||
if target is# "\t"
|
||||
let [line, offset] = self._replace_tab_target(a:lnum, col_num, line)
|
||||
let [line, offset] = self._replace_tab_target(col_num, line)
|
||||
elseif strdisplaywidth(target) > 1
|
||||
let line = self._replace_text_to_space(line, a:lnum, col_num, strdisplaywidth(target))
|
||||
let line = self._replace_text_to_space(line, col_num, strdisplaywidth(target))
|
||||
let offset = strdisplaywidth(target) - len(target)
|
||||
else
|
||||
if do_replace_target
|
||||
@ -602,19 +601,19 @@ function! s:Hinter._replace_line_for_hint(lnum, col_num, line, hint) abort
|
||||
let next_offset = 0
|
||||
if len(a:hint) > 1 && target isnot# "\t"
|
||||
" pass [' '] as hint to stop recursion.
|
||||
let [line, next_offset, _] = self._replace_line_for_hint(a:lnum, col_num + offset + 1, line, [' '])
|
||||
let [line, next_offset, _] = self._replace_line_for_hint(col_num + offset + 1, line, [' '])
|
||||
endif
|
||||
return [line, offset, next_offset]
|
||||
endfunction
|
||||
|
||||
" @return {(line, offset)}
|
||||
function! s:Hinter._replace_tab_target(lnum, col_num, line) abort
|
||||
function! s:Hinter._replace_tab_target(col_num, line) abort
|
||||
let space_len = s:tab2spacelen(a:line, a:col_num)
|
||||
let line = self._replace_text_to_space(a:line, a:lnum, a:col_num, space_len)
|
||||
let line = self._replace_text_to_space(a:line, a:col_num, space_len)
|
||||
return [line, space_len - 1]
|
||||
endfunction
|
||||
|
||||
function! s:Hinter._replace_text_to_space(line, lnum, col_num, len) abort
|
||||
function! s:Hinter._replace_text_to_space(line, col_num, len) abort
|
||||
let target = printf('\%%%dc.', a:col_num)
|
||||
let line = substitute(a:line, target, repeat(' ', a:len), '')
|
||||
return line
|
||||
@ -790,3 +789,29 @@ function! s:throw(message) abort
|
||||
throw 'vital: HitAHint.Motion: ' . a:message
|
||||
endfunction
|
||||
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'create_win2pos2hint': s:___revitalizer_function___('s:create_win2pos2hint'),'deepextend': s:___revitalizer_function___('s:deepextend'),'gather_poses': s:___revitalizer_function___('s:gather_poses'),'gather_visible_matched_poses': s:___revitalizer_function___('s:gather_visible_matched_poses'),'has_patch': s:___revitalizer_function___('s:has_patch'),'is_in_fold': s:___revitalizer_function___('s:is_in_fold'),'move': s:___revitalizer_function___('s:move'),'move_f': s:___revitalizer_function___('s:move_f'),'move_f2': s:___revitalizer_function___('s:move_f2'),'move_to_win': s:___revitalizer_function___('s:move_to_win'),'move_to_winpos': s:___revitalizer_function___('s:move_to_winpos'),'new_overwin': s:___revitalizer_function___('s:new_overwin'),'pos2hint_to_line2col2hint': s:___revitalizer_function___('s:pos2hint_to_line2col2hint'),'pos2poskey': s:___revitalizer_function___('s:pos2poskey'),'poskey2pos': s:___revitalizer_function___('s:poskey2pos'),'setline': s:___revitalizer_function___('s:setline'),'tab2spacelen': s:___revitalizer_function___('s:tab2spacelen'),'throw': s:___revitalizer_function___('s:throw'),'win2pos2hint_to_w2l2c2h': s:___revitalizer_function___('s:win2pos2hint_to_w2l2c2h'),'wincall': s:___revitalizer_function___('s:wincall'),'winnr2poses_to_list': s:___revitalizer_function___('s:winnr2poses_to_list')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#HitAHint#Motion#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -589,3 +589,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'is_input_waiting': s:___revitalizer_function___('s:is_input_waiting'),'make': s:___revitalizer_function___('s:make'),'make_plain': s:___revitalizer_function___('s:make_plain')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Base#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -25,3 +25,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'get': s:___revitalizer_function___('s:get'),'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -162,3 +162,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#BufferComplete#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -23,3 +23,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#Cancel#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -41,3 +41,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#CursorMove#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -39,3 +39,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#Delete#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -104,3 +104,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'doautocmd_user': s:___revitalizer_function___('s:doautocmd_user'),'get_cmdline': s:___revitalizer_function___('s:get_cmdline'),'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#Doautocmd#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -138,3 +138,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make'),'suffix': s:___revitalizer_function___('s:suffix')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#DrawCommandline#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -20,3 +20,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#ExceptionExit#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -49,3 +49,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#ExceptionMessage#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -23,3 +23,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#Exit#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -58,3 +58,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#History#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -147,3 +147,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'get_cmdline_cword': s:___revitalizer_function___('s:get_cmdline_cword'),'input': s:___revitalizer_function___('s:input'),'make': s:___revitalizer_function___('s:make'),'to_string': s:___revitalizer_function___('s:to_string')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#InsertRegister#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -122,3 +122,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'make_emacs': s:___revitalizer_function___('s:make_emacs'),'make_vim_cmdline_mapping': s:___revitalizer_function___('s:make_vim_cmdline_mapping')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#KeyMapping#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -38,3 +38,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make'),'make_special_chars': s:___revitalizer_function___('s:make_special_chars')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#NoInsert#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -23,3 +23,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#Paste#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -55,3 +55,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Commandline#Modules#Redraw#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -29,3 +29,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'error': s:___revitalizer_function___('s:error'),'set_prefix': s:___revitalizer_function___('s:set_prefix'),'throw': s:___revitalizer_function___('s:throw'),'throw_cmd': s:___revitalizer_function___('s:throw_cmd')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Exception#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -23,3 +23,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'getchar': s:___revitalizer_function___('s:getchar')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Input#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -78,3 +78,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'as_key_config': s:___revitalizer_function___('s:as_key_config'),'match_key': s:___revitalizer_function___('s:match_key'),'unmapping': s:___revitalizer_function___('s:unmapping')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Keymapping#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -102,3 +102,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'call': s:___revitalizer_function___('s:call'),'make': s:___revitalizer_function___('s:make')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#Signals#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -147,3 +147,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'index': s:___revitalizer_function___('s:index'),'length': s:___revitalizer_function___('s:length'),'make': s:___revitalizer_function___('s:make'),'split_by_keys': s:___revitalizer_function___('s:split_by_keys')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Over#String#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -57,3 +57,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'command': s:___revitalizer_function___('s:command'),'extend': s:___revitalizer_function___('s:extend')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Palette#Capture#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -116,3 +116,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'capture': s:___revitalizer_function___('s:capture'),'get': s:___revitalizer_function___('s:get'),'group_list': s:___revitalizer_function___('s:group_list'),'links_to': s:___revitalizer_function___('s:links_to'),'parse': s:___revitalizer_function___('s:parse'),'parse_to_name': s:___revitalizer_function___('s:parse_to_name'),'set': s:___revitalizer_function___('s:set')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Palette#Highlight#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -104,3 +104,29 @@ endfunction
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'capture': s:___revitalizer_function___('s:capture'),'capture_list': s:___revitalizer_function___('s:capture_list'),'escape_special_key': s:___revitalizer_function___('s:escape_special_key'),'lhs_key_list': s:___revitalizer_function___('s:lhs_key_list'),'parse_lhs': s:___revitalizer_function___('s:parse_lhs'),'parse_lhs_list': s:___revitalizer_function___('s:parse_lhs_list'),'rhs_key_list': s:___revitalizer_function___('s:rhs_key_list')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Palette#Keymapping#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -383,3 +383,29 @@ let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim:set et ts=2 sts=2 sw=2 tw=0:
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'escape_file_searching': s:___revitalizer_function___('s:escape_file_searching'),'escape_pattern': s:___revitalizer_function___('s:escape_pattern'),'getchar': s:___revitalizer_function___('s:getchar'),'getchar_safe': s:___revitalizer_function___('s:getchar_safe'),'glob': s:___revitalizer_function___('s:glob'),'globpath': s:___revitalizer_function___('s:globpath'),'input_helper': s:___revitalizer_function___('s:input_helper'),'input_safe': s:___revitalizer_function___('s:input_safe'),'is_cygwin': s:___revitalizer_function___('s:is_cygwin'),'is_dict': s:___revitalizer_function___('s:is_dict'),'is_float': s:___revitalizer_function___('s:is_float'),'is_funcref': s:___revitalizer_function___('s:is_funcref'),'is_list': s:___revitalizer_function___('s:is_list'),'is_mac': s:___revitalizer_function___('s:is_mac'),'is_number': s:___revitalizer_function___('s:is_number'),'is_numeric': s:___revitalizer_function___('s:is_numeric'),'is_string': s:___revitalizer_function___('s:is_string'),'is_unix': s:___revitalizer_function___('s:is_unix'),'is_windows': s:___revitalizer_function___('s:is_windows'),'path2directory': s:___revitalizer_function___('s:path2directory'),'path2project_directory': s:___revitalizer_function___('s:path2project_directory'),'set_default': s:___revitalizer_function___('s:set_default'),'smart_execute_command': s:___revitalizer_function___('s:smart_execute_command'),'strwidthpart': s:___revitalizer_function___('s:strwidthpart'),'strwidthpart_reverse': s:___revitalizer_function___('s:strwidthpart_reverse'),'substitute_path_separator': s:___revitalizer_function___('s:substitute_path_separator'),'truncate': s:___revitalizer_function___('s:truncate'),'truncate_skipping': s:___revitalizer_function___('s:truncate_skipping'),'wcswidth': s:___revitalizer_function___('s:wcswidth')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Prelude#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -143,3 +143,29 @@ let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim:set et ts=2 sts=2 sw=2 tw=0:
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'edit_content': s:___revitalizer_function___('s:edit_content'),'get_last_selected': s:___revitalizer_function___('s:get_last_selected'),'get_selected_text': s:___revitalizer_function___('s:get_selected_text'),'is_cmdwin': s:___revitalizer_function___('s:is_cmdwin'),'open': s:___revitalizer_function___('s:open'),'read_content': s:___revitalizer_function___('s:read_content')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Vim#Buffer#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -1,18 +1,31 @@
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Use a Funcref as a special term UNDEFINED
|
||||
" Use a Funcref as a special term _UNDEFINED
|
||||
function! s:undefined() abort
|
||||
return 'undefined'
|
||||
endfunction
|
||||
let s:UNDEFINED = function('s:undefined')
|
||||
let s:_UNDEFINED = function('s:undefined')
|
||||
|
||||
function! s:_vital_loaded(V) abort
|
||||
let s:V = a:V
|
||||
let s:Prelude = s:V.import('Prelude')
|
||||
let s:List = s:V.import('Data.List')
|
||||
let s:Dict = s:V.import('Data.Dict')
|
||||
endfunction
|
||||
function! s:_vital_depends() abort
|
||||
return ['Prelude', 'Data.List', 'Data.Dict']
|
||||
endfunction
|
||||
function! s:_vital_created(module) abort
|
||||
" define constant variables
|
||||
if !exists('s:const')
|
||||
let s:const = {}
|
||||
let s:const.is_local_variable_supported =
|
||||
\ v:version > 703 || (v:version == 703 && has('patch560'))
|
||||
" NOTE:
|
||||
" The third argument is available from 7.4.242 but it had bug and that
|
||||
" bug was fixed from 7.4.513
|
||||
let s:const.is_third_argument_of_getreg_supported = has('patch-7.4.513')
|
||||
lockvar s:const
|
||||
endif
|
||||
call extend(a:module, s:const)
|
||||
@ -41,6 +54,60 @@ function! s:option.restore() abort
|
||||
execute printf('let %s = %s', self.name, string(self.value))
|
||||
endfunction
|
||||
|
||||
let s:register = {}
|
||||
function! s:_new_register(name) abort
|
||||
if len(a:name) != 2
|
||||
call s:_throw(printf(
|
||||
\'A register name "%s" requires to be "@" + a single character', a:name
|
||||
\))
|
||||
elseif a:name !~# '^@'
|
||||
call s:_throw(printf(
|
||||
\'A register name "%s" requires to be started from "@"', a:name
|
||||
\))
|
||||
elseif a:name =~# '^@[:.%]$'
|
||||
call s:_throw(printf(
|
||||
\'A register name "%s" is read only', a:name
|
||||
\))
|
||||
elseif a:name !~# '^@[@0-9a-zA-Z#=*+~_/-]$'
|
||||
call s:_throw(printf(
|
||||
\'A register name "%s" does not exist. See ":help let-register"', a:name
|
||||
\))
|
||||
endif
|
||||
let name = a:name ==# '@@' ? '' : a:name[1]
|
||||
let register = copy(s:register)
|
||||
let register.name = name
|
||||
if s:const.is_third_argument_of_getreg_supported
|
||||
let register.value = getreg(name, 1, 1)
|
||||
else
|
||||
let register.value = getreg(name, 1)
|
||||
endif
|
||||
let register.type = getregtype(name)
|
||||
return register
|
||||
endfunction
|
||||
function! s:register.restore() abort
|
||||
call setreg(self.name, self.value, self.type)
|
||||
endfunction
|
||||
|
||||
let s:environment = {}
|
||||
function! s:_new_environment(name) abort
|
||||
if a:name !~# '^\$'
|
||||
call s:_throw(printf(
|
||||
\'An environment variable name "%s" requires to be started from "$"', a:name
|
||||
\))
|
||||
elseif !exists(a:name)
|
||||
call s:_throw(printf(
|
||||
\'An environment variable name "%s" does not exist. While Vim cannot unlet environment variable, it requires to exist', a:name
|
||||
\))
|
||||
endif
|
||||
let environment = copy(s:environment)
|
||||
let environment.name = a:name
|
||||
let environment.value = eval(a:name)
|
||||
return environment
|
||||
endfunction
|
||||
function! s:environment.restore() abort
|
||||
execute printf('let %s = %s', self.name, string(self.value))
|
||||
endfunction
|
||||
|
||||
let s:variable = {}
|
||||
function! s:_new_variable(name, ...) abort
|
||||
if a:0 == 0
|
||||
@ -62,7 +129,7 @@ function! s:_new_variable(name, ...) abort
|
||||
endif
|
||||
let variable = copy(s:variable)
|
||||
let variable.name = name
|
||||
let variable.value = get(namespace, name, s:UNDEFINED)
|
||||
let variable.value = get(namespace, name, s:_UNDEFINED)
|
||||
let variable.value =
|
||||
\ type(variable.value) == type({}) || type(variable.value) == type([])
|
||||
\ ? deepcopy(variable.value)
|
||||
@ -73,19 +140,51 @@ endfunction
|
||||
function! s:variable.restore() abort
|
||||
" unlet the variable to prevent variable type mis-match in case
|
||||
silent! unlet! self._namespace[self.name]
|
||||
if type(self.value) == type(s:UNDEFINED) && self.value == s:UNDEFINED
|
||||
if type(self.value) == type(s:_UNDEFINED) && self.value == s:_UNDEFINED
|
||||
" do nothing, leave the variable as undefined
|
||||
else
|
||||
let self._namespace[self.name] = self.value
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let s:instance = {}
|
||||
function! s:_new_instance(instance, ...) abort
|
||||
let shallow = get(a:000, 0, 0)
|
||||
if !s:Prelude.is_list(a:instance) && !s:Prelude.is_dict(a:instance)
|
||||
call s:_throw(printf(
|
||||
\'An instance "%s" requires to be List or Dictionary', string(a:instance)
|
||||
\))
|
||||
endif
|
||||
let instance = copy(s:instance)
|
||||
let instance.instance = a:instance
|
||||
let instance.values = shallow ? copy(a:instance) : deepcopy(a:instance)
|
||||
return instance
|
||||
endfunction
|
||||
function! s:instance.restore() abort
|
||||
if s:Prelude.is_list(self.instance)
|
||||
call s:List.clear(self.instance)
|
||||
else
|
||||
call s:Dict.clear(self.instance)
|
||||
endif
|
||||
call extend(self.instance, self.values)
|
||||
endfunction
|
||||
|
||||
let s:guard = {}
|
||||
function! s:store(...) abort
|
||||
let resources = []
|
||||
for meta in a:000
|
||||
if type(meta) == type([])
|
||||
if s:Prelude.is_list(meta)
|
||||
if len(meta) == 1
|
||||
call add(resources, s:_new_instance(meta[0]))
|
||||
elseif len(meta) == 2
|
||||
if s:Prelude.is_string(meta[0])
|
||||
call add(resources, call('s:_new_variable', meta))
|
||||
else
|
||||
call add(resources, call('s:_new_instance', meta))
|
||||
endif
|
||||
else
|
||||
call s:_throw('List assignment requires one or two elements')
|
||||
endif
|
||||
elseif type(meta) == type('')
|
||||
if meta =~# '^[bwtgls]:'
|
||||
" Note:
|
||||
@ -93,9 +192,13 @@ function! s:store(...) abort
|
||||
call add(resources, s:_new_variable(meta))
|
||||
elseif meta =~# '^&'
|
||||
call add(resources, s:_new_option(meta))
|
||||
elseif meta =~# '^@'
|
||||
call add(resources, s:_new_register(meta))
|
||||
elseif meta =~# '^\$'
|
||||
call add(resources, s:_new_environment(meta))
|
||||
else
|
||||
call s:_throw(printf(
|
||||
\ 'Unknown option or variable "%s" was specified',
|
||||
\ 'Unknown value "%s" was specified',
|
||||
\ meta
|
||||
\))
|
||||
endif
|
||||
@ -115,3 +218,29 @@ endfunction
|
||||
let &cpo = s:save_cpo
|
||||
unlet! s:save_cpo
|
||||
" vim:set et ts=2 sts=2 sw=2 tw=0 fdm=marker:
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'_vital_created': s:___revitalizer_function___('s:_vital_created'),'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'store': s:___revitalizer_function___('s:store'),'undefined': s:___revitalizer_function___('s:undefined')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Vim#Guard#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
@ -63,3 +63,29 @@ let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim:set et ts=2 sts=2 sw=2 tw=0:
|
||||
" ___Revitalizer___
|
||||
" NOTE: below code is generated by :Revitalize.
|
||||
" Do not mofidify the code nor append new lines
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:___revitalizer_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze____revitalizer_SID$')
|
||||
endfunction
|
||||
let s:___revitalizer_sid = '<SNR>' . s:___revitalizer_SID() . '_'
|
||||
function! s:___revitalizer_function___(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:___revitalizer_sid, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
let s:___revitalizer_functions___ = {'capture': s:___revitalizer_function___('s:capture'),'echo': s:___revitalizer_function___('s:echo'),'echomsg': s:___revitalizer_function___('s:echomsg'),'error': s:___revitalizer_function___('s:error'),'get_hit_enter_max_length': s:___revitalizer_function___('s:get_hit_enter_max_length'),'warn': s:___revitalizer_function___('s:warn')}
|
||||
|
||||
unlet! s:___revitalizer_sid
|
||||
delfunction s:___revitalizer_function___
|
||||
|
||||
function! vital#_easymotion#Vim#Message#import() abort
|
||||
return s:___revitalizer_functions___
|
||||
endfunction
|
||||
" ___Revitalizer___
|
||||
|
175
autoload/vital/easymotion.vim
Normal file
175
autoload/vital/easymotion.vim
Normal file
@ -0,0 +1,175 @@
|
||||
let s:vital_name = expand('<sfile>:t:r')
|
||||
let s:base_dir = expand('<sfile>:h')
|
||||
let s:loaded = {}
|
||||
|
||||
" function() wrapper
|
||||
if v:version > 703 || v:version == 703 && has('patch1170')
|
||||
function! s:_function(fstr) abort
|
||||
return function(a:fstr)
|
||||
endfunction
|
||||
else
|
||||
function! s:_SID() abort
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze__SID$')
|
||||
endfunction
|
||||
let s:_s = '<SNR>' . s:_SID() . '_'
|
||||
function! s:_function(fstr) abort
|
||||
return function(substitute(a:fstr, 's:', s:_s, 'g'))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
function! vital#{s:vital_name}#of() abort
|
||||
return s:new(s:vital_name)
|
||||
endfunction
|
||||
|
||||
let s:Vital = {}
|
||||
|
||||
function! s:new(vital_name) abort
|
||||
let base = deepcopy(s:Vital)
|
||||
let base.vital_name = a:vital_name
|
||||
return base
|
||||
endfunction
|
||||
|
||||
function! s:vital_files() abort dict
|
||||
if !exists('s:vital_files')
|
||||
let s:vital_files =
|
||||
\ map(s:_self_vital_files(), 'fnamemodify(v:val, ":p:gs?[\\\\/]?/?")')
|
||||
endif
|
||||
return copy(s:vital_files)
|
||||
endfunction
|
||||
let s:Vital.vital_files = s:_function('s:vital_files')
|
||||
|
||||
function! s:import(name, ...) abort dict
|
||||
let target = {}
|
||||
let functions = []
|
||||
for a in a:000
|
||||
if type(a) == type({})
|
||||
let target = a
|
||||
elseif type(a) == type([])
|
||||
let functions = a
|
||||
endif
|
||||
unlet a
|
||||
endfor
|
||||
let module = self._import(a:name)
|
||||
if empty(functions)
|
||||
call extend(target, module, 'keep')
|
||||
else
|
||||
for f in functions
|
||||
if has_key(module, f) && !has_key(target, f)
|
||||
let target[f] = module[f]
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
return target
|
||||
endfunction
|
||||
let s:Vital.import = s:_function('s:import')
|
||||
|
||||
function! s:load(...) abort dict
|
||||
for arg in a:000
|
||||
let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg]
|
||||
let target = split(join(as, ''), '\W\+')
|
||||
let dict = self
|
||||
let dict_type = type({})
|
||||
while !empty(target)
|
||||
let ns = remove(target, 0)
|
||||
if !has_key(dict, ns)
|
||||
let dict[ns] = {}
|
||||
endif
|
||||
if type(dict[ns]) == dict_type
|
||||
let dict = dict[ns]
|
||||
else
|
||||
unlet dict
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if exists('dict')
|
||||
call extend(dict, self._import(name))
|
||||
endif
|
||||
unlet arg
|
||||
endfor
|
||||
return self
|
||||
endfunction
|
||||
let s:Vital.load = s:_function('s:load')
|
||||
|
||||
function! s:unload() abort dict
|
||||
let s:loaded = {}
|
||||
unlet! s:vital_files
|
||||
endfunction
|
||||
let s:Vital.unload = s:_function('s:unload')
|
||||
|
||||
function! s:exists(name) abort dict
|
||||
return exists(printf('*vital#_%s#%s#import', self.vital_name, substitute(a:name, '\.', '#', 'g')))
|
||||
endfunction
|
||||
let s:Vital.exists = s:_function('s:exists')
|
||||
|
||||
function! s:search(pattern) abort dict
|
||||
let paths = s:_extract_files(a:pattern, s:vital_files())
|
||||
let modules = sort(map(paths, 's:_file2module(v:val)'))
|
||||
return s:_uniq(modules)
|
||||
endfunction
|
||||
let s:Vital.search = s:_function('s:search')
|
||||
|
||||
function! s:_self_vital_files() abort
|
||||
let base = s:base_dir . '/*/**/*.vim'
|
||||
return split(glob(base, 1), "\n")
|
||||
endfunction
|
||||
|
||||
function! s:_extract_files(pattern, files) abort
|
||||
let tr = {'.': '/', '*': '[^/]*', '**': '.*'}
|
||||
let target = substitute(a:pattern, '\.\|\*\*\?', '\=tr[submatch(0)]', 'g')
|
||||
let regexp = printf('autoload/vital/[^/]\+/%s.vim$', target)
|
||||
return filter(a:files, 'v:val =~# regexp')
|
||||
endfunction
|
||||
|
||||
function! s:_file2module(file) abort
|
||||
let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?')
|
||||
let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$')
|
||||
return join(split(tail, '[\\/]\+'), '.')
|
||||
endfunction
|
||||
|
||||
" @param {string} name e.g. Data.List
|
||||
function! s:_import(name) abort dict
|
||||
if has_key(s:loaded, a:name)
|
||||
return copy(s:loaded[a:name])
|
||||
endif
|
||||
try
|
||||
let module = vital#_{self.vital_name}#{substitute(a:name, '\.', '#', 'g')}#import()
|
||||
catch /E117: Unknown function:/
|
||||
throw 'vital: revitalizer: module not found: ' . a:name
|
||||
endtry
|
||||
if has_key(module, '_vital_created')
|
||||
call module._vital_created(module)
|
||||
endif
|
||||
let export_module = filter(copy(module), 'v:key =~# "^\\a"')
|
||||
" Cache module before calling module.vital_loaded() to avoid cyclic
|
||||
" dependences but remove the cache if module._vital_loaded() fails.
|
||||
let s:loaded[a:name] = export_module
|
||||
if has_key(module, '_vital_loaded')
|
||||
try
|
||||
call module._vital_loaded(self)
|
||||
catch
|
||||
unlet s:loaded[a:name]
|
||||
throw 'vital: fail to call ._vital_loaded(): ' . v:exception
|
||||
endtry
|
||||
endif
|
||||
return copy(s:loaded[a:name])
|
||||
endfunction
|
||||
let s:Vital._import = function('s:_import')
|
||||
|
||||
if exists('*uniq')
|
||||
function! s:_uniq(list) abort
|
||||
return uniq(a:list)
|
||||
endfunction
|
||||
else
|
||||
function! s:_uniq(list) abort
|
||||
let i = len(a:list) - 1
|
||||
while 0 < i
|
||||
if a:list[i] ==# a:list[i - 1]
|
||||
call remove(a:list, i)
|
||||
let i -= 2
|
||||
else
|
||||
let i -= 1
|
||||
endif
|
||||
endwhile
|
||||
return a:list
|
||||
endfunction
|
||||
endif
|
@ -1,5 +1,5 @@
|
||||
easymotion
|
||||
e083c2e654d057a09b3e18dfbb728b41de89f4a1
|
||||
d461a07c1453747ed867b75ed6cbeccb3eb17312
|
||||
|
||||
Over.Commandline.Base
|
||||
Over.Commandline.Modules.Cancel
|
||||
|
Loading…
Reference in New Issue
Block a user