How to make Vim paste from (and copy to) the system’s clipboard?

TL;DR Try using “*yy or “+yy to copy a line to your system’s clipboard. Full answer Be aware that copying/pasting from the system clipboard will not work if :echo has(‘clipboard’) returns 0. In this case, Vim is not compiled with the +clipboard feature and you’ll have to install a different version or recompile it. Some … Read more

Using Vim as an HTML editor

I do all of my HTML editing in vim. The three plugins I find most helpful for editing HTML and XML in vim are matchit, surround, and allml. Matchit will allow you to jump to the start/end tag with ‘%’. Surround allows you to easily add, delete, and change the surrounding tags. Allml provides you … Read more

What is the difference between the ‘omnifunc’ and ‘completefunc’ autocomplete in Vim, except for the invocation key mapping?

Technically, there is no difference in implementation of both User-defined completion (see :help compl-function, :help ‘completefunc’) and Omni completion (see :help compl-omni, :help ‘omnifunc’). Both of them work by calling a function of special semantics that locates the start of the expression to be completed at the current position, and provides appropriate completion suggestions (see … Read more

Vim Python completion

pythoncomplete is rather old and unmaintained. Try to use Jedi: https://github.com/davidhalter/jedi-vim It was originally an improved pythoncomplete, but is now much much more powerful! It works for complex code: And has additional features: There is a list of all possible features: builtin functions/classes support complex module / function / class structures ignores syntax and indentation … Read more