Re: [hackers][vis][RFC][PATCH 0/2] Suggestion for basic autocomplete functionality

From: Marc André Tanner <>
Date: Mon, 16 May 2016 23:35:35 +0200

On Mon, May 16, 2016 at 01:00:57PM +0200, Silvan Jegen wrote:
> Heyhey
> I have implemented basic autocomplete functionality by sending the text
> at cursor position as a context to shell commands and dmenu. The user
> then chooses the autocompletion text he wants to use in dmenu which is
> then inserted at cursor position.
> Ideally the same approach should be used for code completion by sending
> some context to a code completion daemon (like gocode[0] for example). The
> daemon's output can then be sent to dmenu and selected by the user.
> The patches are still rough but I did not want to invest more time
> without knowing if such an approach would be considered for inclusion
> or not. Let me know what you think.

Just a couple of comments from glancing over the patches (I will have
to take a closer look once I have more time):

 - use vis-menu (part of lattest git) as a wrapper around dmenu and slmenu

 - this should also work for unsaved or unnamed files, instead of
   using `cat filename` you should pipe the current file content to
   the external application

 - completion should probably be based on the primary (view_cursors_primary_get)
   not the the first cursor (view_cursors)


 Marc André Tanner >< >< GPG key: 10C93617
Received on Mon May 16 2016 - 23:35:35 CEST

This archive was generated by hypermail 2.3.0 : Mon May 16 2016 - 23:36:13 CEST