Inherits from NSObject
Declared in ExParser.h

Overview

Parser for ex commands.

Tasks

Class Methods

sharedParser

A shared ex parser instance.

+ (ExParser *)sharedParser

Return Value

A shared ex parser instance.

Declared In

ExParser.h

Instance Methods

expand:error:

Expand filename metacharacters

- (NSString *)expand:(NSString *)string error:(NSError **)outError

Parameters

string

The string to expand.

outError

Return value parameter for errors. May be nil.

Return Value

The expanded string.

Discussion

This method expands % and # to the current and alternate document URLs, respectively. The following modifiers are recognized:

  • :p — replace with normalized path
  • :h — head of url; delete the last path component (may be specified multiple times)
  • :t — tail of url; replace with last path component
  • :e — replace with the extension
  • :r — root of url; delete the path extension

To insert a literal % or # character, escape it with a backslash (\). Escapes are removed.

Declared In

ExParser.h

parse:error:

Parse an ex command.

- (ExCommand *)parse:(NSString *)string error:(NSError **)outError

Parameters

string

The whole ex command string to parse.

outError

Return value parameter for errors. May be nil.

Return Value

An ExCommand, or nil on error.

Declared In

ExParser.h