company-mode completion using previous lines.
A simple backend offering buffer lines above point as completion candidates with point at the end of a line.
Put company-sameline.el
somewhere in load-path
, then load it and
add company-sameline
to company-backends
within your emacs init
file:
(require 'company-sameline)
(add-to-list 'company-backends 'company-sameline)
Since this type of completion will probably be useful under rather specific circumstances only, a buffer-local variable is used to activate or deactivate it.
Set company-sameline-active
to t
to turn it on. I usually do this
in a file variable.