jparise / vim-graphql

A Vim plugin that provides GraphQL file detection, syntax highlighting, and indentation.
MIT License
487 stars 25 forks source link

Skip comments and strings when matching brackets #63

Closed jparise closed 4 years ago

jparise commented 4 years ago

When searching backwards for a matching bracket, we use searchpair()'s 'skip' expression to ignore any candidates inside of strings and comments.

When checking whether the previous line ends in an opening bracket, we exclude any matches that are part of a comment.