Javascript / DOM API autocomplete in vim?

I always make typos when typing long function names like ctx.createRadialGradient . It will be great if I can autofill them.

  • Is there any plugin that I can use out of the box?
  • If not, how to add new custom vim autocomplete keywords?
+4
source share
1 answer

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.

+3
source

All Articles