1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 09:40:06 +08:00
SpaceVim/bundle/wildfire.vim/autoload/wildfire/triggers.vim
2020-06-13 14:06:35 +08:00

20 lines
769 B
VimL
Vendored

let s:triggers = []
fu! wildfire#triggers#All()
return s:triggers
endfu
fu! wildfire#triggers#Add(trigger, objects)
let s:triggers = add(s:triggers, a:trigger)
exe "nnoremap <silent>" a:trigger ":<C-U>call wildfire#Start(v:count1, ". string(a:objects) .")<CR>"
exe "onoremap <silent>" a:trigger ":<C-U>call wildfire#Start(v:count1, ". string(a:objects) .")<CR>"
exe "vnoremap <silent>" a:trigger ":<C-U>call wildfire#Fuel(v:count1)<CR>"
endfu
fu! wildfire#triggers#AddQs(trigger, objects)
let s:triggers = add(s:triggers, a:trigger)
exe "nnoremap <silent>" a:trigger ":<C-U>call wildfire#QuickSelect(". string(a:objects) .")<CR>"
exe "onoremap <silent>" a:trigger ":<C-U>call wildfire#QuickSelect(". string(a:objects) .")<CR>"
endfu