Vim's Ctrl+P autocomplete for identifiers with dash '-'

autocomplete, vim

Solution

There's an option just for you:

:set lisp

See `:help 'iskeyword'` and `:help 'lisp'`.

Problem

In Lispy code there can be identifiers with dash signs instead of underscores, like that: ``` (defn create-something ...) (defn create-anything ...) (defn create-nothing ...) ``` If type `crea^P`, Vim shows just "create" as completing result. How to make it interpret '-' as part of identifier and offer the whole identifiers for completion?

Original source