Skip to content

'nomagic' breaks matching for several commands #157

Open
@Markus00000

Description

@Markus00000

:set nomagic breaks the matching for several commands. I assume not all regular expressions in the plugin specify that they require a certain magic mode.

Example:

word word word
word word word

word word word
word word word

With magic, pressing \\w matches all words and the empty line (I'm using 'X' to mark the matches):

Xord Xord Xord
Xord Xord Xord
X
Xord Xord Xord
Xord Xord Xord

With nomagic, only the empty line is matched:

word word word
word word word
X
word word word
word word word

Regular expressions in plugins should always specify the magic mode they require: \v \m \M \V

See: http://vimdoc.sourceforge.net/htmldoc/pattern.html#/magic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions