Use vim's index() function to find values in a list

.. this expresses the intent to test for presence-in-list more clearly
than a manually written for-loop.