Vim - producing a drop down menu for manual search

Viewed 808

I am trying to write my own autocomplete function in Vim which mimics a nice feature of the CTRL-x CTRL-(l,n, or p) autocomplete, namely I want to produce a drop down menu of possible choices to select from.

My issue with the commands above is that they search to complete the current word and I would like to create a search that handles any sequence of consecutive special characters as well. I have worked out the search feature for my function using regular expressions and the normal command, but I do now know how to produce the menu of choices.

Any tips would be much appreciated.

(Note: I know there are plugins that may offer this feature, but I am more interested in understanding how to accomplish this using the built-in Vim functionality.)

1 Answers
Related