Search code examples
vimomnicomplete

How do I change the boundaries of symbols used/detected in Vim omni completion?


For example, in Sass I'm using dashes for variable names, and I have a variable called:

$hello-there

If I type in he then attempt to complete it, it will only complete hello. How would I make it so that it would complete hello-there?


Solution

  • One way to do it is adding the dash to the iskeyword option. Something like the following:

    set iskeyword+=-
    

    Maybe you could add this setting only to sass files only using the appropriate filetype.