Ticket #3734 (new task)

Opened 6 years ago

Last modified 3 years ago

Improve the syntax documentation

Reported by: mooffie Owned by:
Priority: major Milestone: Future Releases
Component: documentation Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:


There are several features not documented well, or not documented at all:

[I'll edit this text from time to time to improve and extend it. Everybody: feel free to add comments and I'll incorporate them here. When we're finished we'll convert this to nroff format.]


Matches any length of characters (except newline). To be exact, it matches any character which is not the next one in the pattern. This effectively makes it "non-greedy" and lets you do ${*} to match a shell variable.


Surprisingly, it does not mean "match 1 or more characters". TODO.


\{chars\} matches one character.


\[chars\] matches 0 or more characters. It's greedy, which means that if chars contains any of the characters appearing later in the pattern then the match will fail. (TODO: what's the purpose of "if (p[1] == d) i--;" introduced in commit df20f28f2e2b614 ?)


  • Pressing C-s twice effectively reloads the syntax file (so you don't have to exit the editor, or MC itself, to test your syntax modifications).

Change History

comment:1 Changed 3 years ago by andrew_b

  • Component changed from mcedit to documentation
Note: See TracTickets for help on using tickets.