In insert mode, there is the command Ctrl-X Ctrl-P to complete previous matches. Therefore, if you have:
ctx.createRadialGradient ctx.createGradient ctx.create
and start writing ctx.cr , press Ctrl-X Ctrl-P , and these lines will appear in the context window, you can move around them with arrows or with Ctrl-N for Next or Ctrl-P for Previous.
Birei source share