NSEvent(keyAdditions) Category Reference
+Declared in | +NSEvent-keyAdditions.h | +
Tasks
+ + + + + +-
+
-
+
+
– normalizedKeyCode
+The normalized key code from a key event.
+ + + +
+
diff --git a/doc/about.html b/doc/about.html new file mode 100644 index 00000000..05ecd7dd --- /dev/null +++ b/doc/about.html @@ -0,0 +1,71 @@ + + +
+ + +Vico is a programmers text editor for Mac OS X.
+Some of the features are:
++ Click images to see a larger version. +
+Declared in | +NSEvent-keyAdditions.h | +
– normalizedKeyCode
+ The normalized key code from a key event.
+ + + +Declared in | +NSString-additions.h | +
– numberOfLines
+ Count lines.
+ + + +– occurrencesOfCharacter:
+ Count occurrences of a character.
+ + + ++ stringWithKeyCode:
+ Return the string representation of a key code.
+ + + ++ stringWithKeySequence:
+ Return the string representation of a key sequence.
+ + + +– keyCodes
+ Convert a string to an array of key codes.
+ + + +– isUppercase
+ YES if the string is in uppercase.
+ + + +Return the string representation of a key code.
++ (NSString *)stringWithKeyCode:(NSInteger)keyCode
The key code to make into a string.
The string representation of the key code.
+NSString-additions.h
Return the string representation of a key sequence.
++ (NSString *)stringWithKeySequence:(NSArray *)keySequence
An array of NSNumbers representing key codes.
The string representation of the key codes.
+NSString-additions.h
YES if the string is in uppercase.
+- (BOOL)isUppercase
YES if the string is in uppercase.
+NSString-additions.h
Convert a string to an array of key codes.
+- (NSArray *)keyCodes
An array of NSNumbers representing key codes.
+NSString-additions.h
Count lines.
+- (NSInteger)numberOfLines
The number of lines in the string.
+NSString-additions.h
Count occurrences of a character.
+- (NSUInteger)occurrencesOfCharacter:(unichar)ch
The character to search for.
The number of occurrences of the character.
+NSString-additions.h
Declared in | +NSView-additions.h | +
– targetForSelector:
+ Find the target for a command action.
+ + + +Find the target for a command action.
+- (id)targetForSelector:(SEL)action
The command action being executed.
The first object responding to the selector, or nil
if not found.
The following objects are checked if they respond to the action selector:
+ +NSView-additions.h
Inherits from | +NSObject | +
Declared in | +ExCommand.h | +
mapping
+ The mapping that describes the action.
+ + property + + naddr
+ Number of addresses given in the range.
+ + property + + addr1
+ First range address.
+ + property + + addr2
+ Second range address.
+ + property + + lineAddress
+ Target line address.
+ + property + + range
+ Resolved character range of affected text.
+ + property + + lineRange
+
+
+ property
+
+ line
+ Resolved target line number.
+ + property + + count
+ Count argument.
+ + property + + force
+ YES if !
flag specified.
append
+ YES if >>
flag specified.
filter
+ YES if filtering (as in :read !ls
or :write !wc
).
nextCommand
+ Next ex command separated with a bar (|
).
arg
+ Extra argument string.
+ + property + + plus_command
+ Ex command string for the +
argument (as in :edit +cmd file
).
pattern
+ Regular expression pattern.
+ + property + + replacement
+ Replacement template string for :s
command.
options
+ Regular expression option string for :s
command.
reg
+ Destination register, or 0 if none specified.
+ + property + + caret
+ If set, specifies final location of caret after command returns.
+ + property + +– message:
+ Return a message to caller.
+ + + +First range address.
+@property (nonatomic, assign, readwrite) ExAddress *addr1
ExCommand.h
Second range address.
+@property (nonatomic, assign, readwrite) ExAddress *addr2
ExCommand.h
YES if >>
flag specified.
@property (nonatomic, readwrite) BOOL append
ExCommand.h
Extra argument string.
+@property (nonatomic, assign, readwrite) NSString *arg
ExCommand.h
If set, specifies final location of caret after command returns.
+@property (nonatomic, readwrite) NSInteger caret
ExCommand.h
Count argument.
+@property (nonatomic, assign, readwrite) NSInteger count
ExCommand.h
YES if filtering (as in :read !ls
or :write !wc
).
@property (nonatomic, readwrite) BOOL filter
ExCommand.h
YES if !
flag specified.
@property (nonatomic, readwrite) BOOL force
ExCommand.h
Resolved target line number.
+@property (nonatomic, readwrite) NSUInteger line
This is an absolute line number.
+ExCommand.h
Target line address.
+@property (nonatomic, assign, readwrite) ExAddress *lineAddress
ExCommand.h
@property (nonatomic, readwrite) NSRange lineRange
lineRange
.location
specifies a line number, and lineRange
.lenght
number of affected lines.
ExCommand.h
The mapping that describes the action.
+@property (nonatomic, readonly) ExMapping *mapping
ExCommand.h
Number of addresses given in the range.
+@property (nonatomic, readwrite) NSUInteger naddr
ExCommand.h
Next ex command separated with a bar (|
).
@property (nonatomic, assign, readwrite) ExCommand *nextCommand
ExCommand.h
Regular expression option string for :s
command.
@property (nonatomic, assign, readwrite) NSString *options
ExCommand.h
Regular expression pattern.
+@property (nonatomic, assign, readwrite) NSString *pattern
ExCommand.h
Ex command string for the +
argument (as in :edit +cmd file
).
@property (nonatomic, assign, readwrite) NSString *plus_command
ExCommand.h
Resolved character range of affected text.
+@property (nonatomic, readwrite) NSRange range
ExCommand.h
Return a message to caller.
+- (void)message:(NSString *)message
The message to display.
The last message will be shown in the ex command line after command returns.
+ExCommand.h
Inherits from | +NSObject | +
Declared in | +ExMap.h | +
+ defaultMap
+ The default ex map.
+ + + +– lookup:
+ Look up an ex command definition given the name.
+ + + +– define:syntax:as:
+ Add an ex command definition.
+ + + +Add an ex command definition.
+- (ExMapping *)define:(id)aName syntax:(NSString *)aSyntax as:(id)implementation
The name, and optionally, aliases of the command. This is either +an NSString or an NSArray instance. If an array is passed, all entries should +be instances of NSString. The first string is taken as the primary name and +used in error messages.
A syntax string describing the format of arguments.
Either an NSString instance naming a selector, or a NuBlock +instance specifying a Nu function. The Nu function takes on optional parameter; +an instance of ExCommand that describes the arguments.
the command definition, or nil on error.
+
ExMap.h
Look up an ex command definition given the name.
+- (ExMapping *)lookup:(NSString *)aString
the name of the command. May be abbreviated as long as it is not ambiguous.
the defined ex command, or nil if not found.
+ExMap.h
Inherits from | +NSObject | +
Declared in | +ExMap.h | +
The primary name of this command.
+@property (nonatomic, readonly) NSString *name
ExMap.h
All names and aliases of this command.
+@property (nonatomic, readonly) NSArray *names
ExMap.h
Syntax string describing the format and arguments of the command.
+@property (nonatomic, readonly) NSString *syntax
The syntax string consists of the following characters:
+ +!
— allow ! directly after command namer
— allow range%
— default to whole file if no range+
— allow “+command” argumentc
— allow count > 0e
— allow extra argument(s)E
— require extra argument(s)1
— only one extra argument allowedx
— expand wildcards and filename meta chars (‘%’ and ‘#’) in extra argumentsR
— allow registerl
— allow an optional line argumentL
— require a line argument~
— allow /regexp/replace/flags argument/
— allow /regexp/flags argument|
(bar) — do NOT end command with a trailing barm
— command modifies documentExMap.h
Inherits from | +NSObject | +
Declared in | +ExParser.h | +
+ sharedParser
+ A shared ex parser instance.
+ + + +– parse:error:
+ Parse an ex command.
+ + + +– expand:error:
+ Expand filename metacharacters
+ + + +Expand filename metacharacters
+- (NSString *)expand:(NSString *)string error:(NSError **)outError
The string to expand.
Return value parameter for errors. May be nil
.
The expanded string.
+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 extensionTo insert a literal %
or #
character, escape it with a backslash (\
).
+Escapes are removed.
ExParser.h
Parse an ex command.
+- (ExCommand *)parse:(NSString *)string error:(NSError **)outError
The whole ex command string to parse.
Return value parameter for errors. May be nil
.
An ExCommand, or nil on error.
+ExParser.h
Inherits from | +NSObject | +
Declared in | +ViCommand.h | +
mapping
+
+
+ property
+
+ count
+ Any count given to the command.
+ + property + + isLineMode
+ YES if the mapped action operates on whole lines.
+ + property + + isMotion
+
+
+ property
+
+ hasOperator
+ YES if the mapped action is a motion component for an operator.
+ + property + + argument
+ The argument, if any. Only applicable if the mapping specified the ViMapNeedArgument flag.
+ + property + + reg
+ The register, if any.
+ + property + + motion
+
+
+ property
+
+ operator
+ The operator command, if this command is a motion component.
+ + property + +@property (nonatomic, readwrite) unichar argument
ViCommand.h
Any count given to the command.
+@property (nonatomic, readwrite) int count
ViCommand.h
@property (nonatomic, readonly) BOOL hasOperator
ViCommand.h
YES if the mapped action operates on whole lines.
+@property (nonatomic, readwrite) BOOL isLineMode
ViCommand.h
@property (nonatomic, readonly) BOOL isMotion
ViCommand.h
@property (nonatomic, readonly) ViMapping *mapping
ViCommand.h
@property (nonatomic, readwrite) ViCommand *motion
ViCommand.h
Inherits from | +NSDocument | +
Conforms to | +NSLayoutManagerDelegate NSTextStorageDelegate NSTextViewDelegate ViDeferredDelegate ViViewDocument |
+
Declared in | +ViDocument.h | +
views
+ The set of visible views of the document.
+ + property + + textStorage
+ Return the ViTextStorage object.
+ + property + +– text
+ Return a scriptable text view.
+ + + +– language
+ Get the language syntax.
+ + + +– makeView
+ Create a new view of the document.
+ + + +– cloneView:
+ Create a new view of the document by cloning an existing view.
+ + + +– removeView:
+ Remove a view from the set of visible views.
+ + + +– addView:
+ Add a view to the set of visible views.
+ + + +– scopeAtLocation:
+ Return the scope at a given location.
+ + + +– bestMatchingScope:atLocation:
+ Find the best matching scope selector.
+ + + +– rangeOfScopeSelector:atLocation:
+ Find the range where a scope selector matches.
+ + + +Return the ViTextStorage object.
+@property (nonatomic, readonly) ViTextStorage *textStorage
ViDocument.h
Add a view to the set of visible views.
+- (void)addView:(ViDocumentView *)aDocumentView
The view to add.
ViTabController.h
Find the best matching scope selector.
+- (NSString *)bestMatchingScope:(NSArray *)scopeSelectors atLocation:(NSUInteger)aLocation
Scope selectors to test.
The location of the scope.
The scope selector with the highest matching rank at the given location.
+ViDocument.h
Create a new view of the document by cloning an existing view.
+- (ViDocumentView *)cloneView:(ViDocumentView *)oldView
The view that is being cloned.
The newly created view of the document.
+The new view is expected to inherit properties from the cloned view, such as caret location.
+ViTabController.h
Get the language syntax.
+- (ViLanguage *)language
ViDocument.h
Create a new view of the document.
+- (ViDocumentView *)makeView
The newly created view of the document.
+ViTabController.h
Find the range where a scope selector matches.
+- (NSRange)rangeOfScopeSelector:(NSString *)scopeSelector atLocation:(NSUInteger)aLocation
Scope selectors to test.
A location where the scope selector matches.
The whole range where the scope selector matches, possibly with different ranks.
+ViDocument.h
Remove a view from the set of visible views.
+- (void)removeView:(ViDocumentView *)aDocumentView
The view to remove.
ViTabController.h
Return the scope at a given location.
+- (ViScope *)scopeAtLocation:(NSUInteger)aLocation
The location of the scope.
The scope at the given location, or nil of aLocation is not valid or no language syntax available.
+ViDocument.h
Inherits from | +NSObject | +
Declared in | +ViEventManager.h | +
The event manager is used to automatically run code when specific
+events occur. An event handler is defined as a Nu function, typically
+an anonymous function created with the Nu do
operator. An event
+handler will receive zero or more arguments, depending on the event.
+Any return value is ignored.
The standard events are described below.
+ +didFinishLaunching
Emitted when Vico has finished launching.
+arguments: none
+willResignActive
Emitted when Vico resigns active state (ie, loses focus).
+arguments: none
+didBecomeActive
Emitted when Vico becomes active (ie, regains focus).
+arguments: none
+didAddDocument
Emitted when a new document is opened.
+arguments: document
+didRemoveDocument
Emitted when a document is closed.
+arguments: document
+willChangeURL
Emitted before a document changes it's URL.
+arguments: document, url
+didChangeURL
Emitted after a document changed it's URL.
+arguments: document, url
+willLoadDocument
Emitted before a document is loaded.
+arguments: document, url
+didLoadDocument
Emitted after a document was loaded.
+arguments: document
+willSaveDocument
Emitted before a document is being saved.
+arguments: document
+didSaveDocument
Emitted after a document was saved.
+arguments: document
+willSaveAsDocument
Emitted before a document is being saved at a new URL.
+arguments: document, url
+didSaveAsDocument
Emitted after a document was saved at a new URL.
+arguments: document, url
+willCloseDocument
Emitted before a document is closed.
+arguments: document
+didCloseDocument
Emitted after a document was closed.
+arguments: document
+didModifyDocument
Emitted after a document was modified.
+arguments: document, range, delta
+didMakeView
Emitted after a new document view was created.
+arguments: document, view, text
+willChangeSyntax
Emitted before a document changes language syntax.
+arguments: document, language
+didChangeSyntax
Emitted after a document changed language syntax.
+arguments: document, language
+caretDidMove
Emitted after the caret has changed in a text view.
+arguments: text
+willSelectDocument
Emitted before the selected document is changed in a window.
+arguments: window, document
+didSelectDocument
Emitted after the selected document was changed in a window.
+arguments: window, document
+willSelectView
Emitted before the selected view is changed in a window.
+arguments: window, view
+didSelectView
Emitted after the selected view was changed in a window.
+arguments: window, view
+willSelectTab
Emitted before the selected tab is changed in a window.
+arguments: window, tab controller
+didSelectTab
Emitted after the selected tab was changed in a window.
+arguments: window, tab controller
+didAddView
Emitted after a view was added to a tab.
+arguments: view
+didCloseView
Emitted after a view was removed from a tab.
+arguments: view
++ defaultManager
+ The default global event manager.
+ + + +– emit:for:withArguments:
+ Emit an event immediately.
+ + + +– emitDelayed:for:withArguments:
+ Emit an event in the next run loop iteration.
+ + + +– on:by:do:
+ Register a handler for an event by a specific object.
+ + + +– on:do:
+ Register an event handler.
+ + + +– clear:for:
+ Remove all events handlers for a specific object.
+ + + +– clear:
+ Remove all handlers for an event.
+ + + +– clearFor:
+ Remove all handlers for an object.
+ + + +– clear
+ Remove all handlers for all events.
+ + + +– remove:
+ Remove an event handler.
+ + + +Remove all handlers for all events.
+- (void)clear
ViEventManager.h
Remove all handlers for an event.
+- (void)clear:(NSString *)event
The name of the event; cannot be nil
.
ViEventManager.h
Remove all events handlers for a specific object.
+- (void)clear:(NSString *)event for:(id)owner
The name of the event; cannot be nil
.
The object that is responsible for emitting the event.
ViEventManager.h
Remove all handlers for an object.
+- (void)clearFor:(id)owner
The object that is responsible for emitting the event.
ViEventManager.h
Emit an event immediately.
+- (void)emit:(NSString *)event for:(id)owner withArguments:(id)arguments
The name of the event; cannot be nil
.
The object that is responsible for emitting the event.
The arguments to the event handler. Can either be an NSArray or a Nu list.
You should not manually emit any of the standard events.
+ViEventManager.h
Emit an event in the next run loop iteration.
+- (void)emitDelayed:(NSString *)event for:(id)owner withArguments:(id)arguments
The name of the event; cannot be nil
.
The object that is responsible for emitting the event.
The arguments to the event handler. Can either be an NSArray or a Nu list.
You should not manually emit any of the standard events.
+ViEventManager.h
Register a handler for an event by a specific object.
+- (NSInteger)on:(NSString *)event by:(id)owner do:(NuBlock *)expression
The name of the event; cannot be nil
.
The object that emitted the event.
A Nu anonymous function (do
block). See the Nu documentation.
+The number of arguments to the function must match the number of arguments emitted.
A unique event ID.
+This event handler is called whenever the event
is emitted by the
+owner
object.
ViEventManager.h
Register an event handler.
+- (NSInteger)on:(NSString *)event do:(NuBlock *)expression
The name of the event; cannot be nil
.
A Nu anonymous function (do
block). See the Nu documentation.
+The number of arguments to the function must match the number of arguments emitted.
A unique event ID.
+This event handler is called whenever the event
is emitted,
+regardless of the emitting object.
ViEventManager.h
Remove an event handler.
+- (void)remove:(NSInteger)eventId
An event ID as returned by on:by:do:.
ViEventManager.h
Inherits from | +NSObject | +
Declared in | +ViKeyManager.h | +
The key manager handles key input and macro evaluation.
+ +The key manager uses a ViParser to parse key events into a ViCommand.
+ parser
+
+
+ property
+
+ target
+ The target object that evaluates the parsed commands. Should conform +to the ViKeyManagerTarget protocol.
+ + property + +– initWithTarget:parser:
+ Initialize a new key manager with a target object and a key parser.
+ + + +– initWithTarget:defaultMap:
+ Initialize a new key manager with a target object and a default key map.
+ + + +– performKeyEquivalent:
+ Handle a key equivalent event.
+ + + +– performKeyEquivalent:inScope:
+ Handle a key equivalent event.
+ + + +– keyDown:
+ Handle a keyDown event.
+ + + +– keyDown:inScope:
+ Handle a keyDown event.
+ + + +– handleKey:
+ Manually parse a key.
+ + + +– handleKey:inScope:
+ Manually parse a key.
+ + + +@property (nonatomic, readwrite, assign) ViParser *parser
ViKeyManager.h
The target object that evaluates the parsed commands. Should conform +to the ViKeyManagerTarget protocol.
+@property (nonatomic, readwrite, assign) id<ViKeyManagerTarget> target
ViKeyManager.h
Manually parse a key.
+- (BOOL)handleKey:(NSInteger)keyCode
The key code of the key.
ViKeyManager.h
Manually parse a key.
+- (BOOL)handleKey:(NSInteger)keyCode inScope:(ViScope *)scope
The key code of the key.
The scope to consider when parsing the key.
ViKeyManager.h
Initialize a new key manager with a target object and a default key map.
+- (ViKeyManager *)initWithTarget:(id<ViKeyManagerTarget>)aTarget defaultMap:(ViMap *)map
The target of generated commands.
The default map to use when creating a new key parser.
ViKeyManager.h
- (ViKeyManager *)initWithTarget:(id<ViKeyManagerTarget>)aTarget parser:(ViParser *)aParser
The target of generated commands.
An existing key parser.
This is the designated initialzer.
+ViKeyManager.h
Handle a keyDown event.
+- (void)keyDown:(NSEvent *)theEvent
A key event.
ViKeyManager.h
Handle a keyDown event.
+- (void)keyDown:(NSEvent *)theEvent inScope:(ViScope *)scope
A key event.
The scope where the key event occurred.
ViKeyManager.h
Handle a key equivalent event.
+- (BOOL)performKeyEquivalent:(NSEvent *)theEvent
A key equivalent event.
YES if the key equivalent was handled. NO if the key equivalent was not recognized.
+ViKeyManager.h
Handle a key equivalent event.
+- (BOOL)performKeyEquivalent:(NSEvent *)theEvent inScope:(ViScope *)scope
A key equivalent event.
The scope where the key equivalent event occurred.
YES if the key equivalent was handled. NO if the key equivalent was not recognized.
+ViKeyManager.h
Inherits from | +NSObject | +
Declared in | +ViLanguage.h | +
The top-level scope of the language.
+@property (nonatomic, readonly) ViScope *scope
ViLanguage.h
Inherits from | +NSObject | +
Declared in | +ViMap.h | +
A map contains keys (or key sequences) mapped to editor actions, macros or Nu expressions.
+ +A key sequence is a string of one or more keys. A key can be a +regular character like ‘a’ or ‘€’. Key characters are case sensitive, +so ‘a’ is different from ‘A’.
+ +Special keys are specified as a string within angle brackets,
+like <f4>
, <down>
or <enter>
. Modifiers are prepended with
+a separating dash, like <control-f4>
, <command-down>
or
+<alt-enter>
. Multiple modifiers are also possible: <alt-command-tab>
.
+The order of modifiers is not significant.
The following modifiers are recognized:
+ +control
, ctrl
or c
— Control modifieroption
, alt
, meta
, a
or m
— Option modifiercommand
, cmd
or d
— Command modifiershift
or s
— Shift modifierFor single character keys, the shift
modifier should not be
+used. Use the corresponding upper case character instead. The same
+applies to the option
modifier; if the generated character is a
+valid unicode character, use that character and drop the option
+modifier.
The following special keys are recognized:
+ +delete
or del
— Delete function keyleft
— Left arrow keyright
— Right arrow keyup
— Up arrow keydown
— Down arrow keypageup
or pgup
— Page Up function keypagedown
or pgdn
— Page Down function keyhome
— Home function keyend
— End function keyinsert
or ins
— Insert function keyhelp
— Help function keybackspace
or bs
— Backspace keytab
— Tab keyescape
or esc
— Escape keycr
, enter
or return
— Enter keybar
— |
keylt
— <
keybackslash
or bslash
— \
keynl
— Same as <control-j>
ff
— Same as <control-l>
nul
— Null keyMappings that are limited by a scope selector will only be recognized if +the current scope matches the selector. If multiple mappings match the +current scope, the scope selector with the highest rank is used. Mappings +with an empty scope selector has the lowest possible rank.
+ operatorMap
+ Assign a map to be used by operator actions.
+ + property + + acceptsCounts
+ If YES, leading digits acts as count to commands. +If NO, digits are treated as normal commands.
+ + property + + defaultAction
+ If no mapping matches a key sequence, this action is called.
+ + property + ++ mapWithName:
+ Create a new empty map.
+ + + ++ insertMap
+ The map used in insert mode.
+ + + ++ normalMap
+ The map used in normal mode.
+ + + ++ operatorMap
+ The map used after an operator command.
+ + + ++ visualMap
+ The map used in visual mode.
+ + + ++ explorerMap
+ The map used in the file explorer sidebar.
+ + + ++ symbolMap
+ The map used in the symbol list sidebar.
+ + + ++ completionMap
+ The map used in completion popups.
+ + + +– includesMap:
+ Check if a map is included by another map.
+ + + +– include:
+ Add a reference to another map.
+ + + +– map:to:recursively:scope:
+ Map a key sequence to a macro.
+ + + +– map:to:scope:
+ Map a key sequence to a macro non-recursively.
+ + + +– map:to:
+ Globally map a key sequence to a macro non-recursively.
+ + + +– map:toExpression:scope:
+ Map a key sequence to a Nu expression.
+ + + +– map:toExpression:
+ Map a key sequence to a Nu expression.
+ + + +– setKey:toAction:flags:parameter:scope:
+ Map a key sequence to an action.
+ + + +– setKey:toAction:
+ Map a key sequence to an action.
+ + + +– setKey:toMotion:flags:parameter:scope:
+ Map a key sequence to a motion action.
+ + + +– setKey:toMotion:
+ Map a key sequence to a motion action.
+ + + +– setKey:toEditAction:flags:parameter:scope:
+ Map a key sequence to an edit action.
+ + + +– setKey:toEditAction:
+ Map a key sequence to an edit action.
+ + + +– setKey:toOperator:flags:parameter:scope:
+ Map a key sequence to an operator action.
+ + + +– setKey:toOperator:
+ Map a key sequence to an operator action.
+ + + +– unmap:scope:
+ Unmap a key sequence in a specific scope.
+ + + +– unmap:
+ Unmap a key sequence without a limiting scope.
+ + + +If YES, leading digits acts as count to commands. +If NO, digits are treated as normal commands.
+@property (nonatomic, readwrite) BOOL acceptsCounts
acceptsCounts
should be disabled for maps in insert mode.
+Default is YES.
ViMap.h
The map used in completion popups.
++ (ViMap *)completionMap
The map used in completion popups.
+ViMap.h
The map used in the file explorer sidebar.
++ (ViMap *)explorerMap
The map used in the file explorer sidebar.
+ViMap.h
The map used in insert mode.
++ (ViMap *)insertMap
The map used in insert mode.
+ViMap.h
Create a new empty map.
++ (ViMap *)mapWithName:(NSString *)mapName
The name of the map.
The newly created map. It is initially empty.
+ViMap.h
The map used in normal mode.
++ (ViMap *)normalMap
The map used in normal mode.
+ViMap.h
The map used after an operator command.
++ (ViMap *)operatorMap
The map used after an operator command.
+ViMap.h
Add a reference to another map.
+- (void)include:(ViMap *)map
The other map to include in this map.
Mappings in an included map can be overridden by mappings in the parent map.
+ViMap.h
Check if a map is included by another map.
+- (BOOL)includesMap:(ViMap *)aMap
The map to check for inclusion.
YES if the given map is included by this map.
+ViMap.h
Globally map a key sequence to a macro non-recursively.
+- (void)map:(NSString *)keySequence to:(NSString *)macro
The key sequence to map.
The key sequence that make up the macro.
ViMap.h
Map a key sequence to a macro.
+- (void)map:(NSString *)keySequence to:(NSString *)macro recursively:(BOOL)recursiveFlag scope:(NSString *)scopeSelector
The key sequence to map. Can include special keys within angle brackets, like <cmd-ctrl-up>
.
The key sequence that make up the macro.
YES if the macro should be evaluated recursively.
A scope selector limiting where this key sequence is applicable, or nil for no limit.
ViMap.h
Map a key sequence to a macro non-recursively.
+- (void)map:(NSString *)keySequence to:(NSString *)macro scope:(NSString *)scopeSelector
The key sequence to map.
The key sequence that make up the macro.
A scope selector limiting where this key sequence is applicable, or nil for no limit.
ViMap.h
Map a key sequence to a Nu expression.
+- (void)map:(NSString *)keySequence toExpression:(id)expr
The key sequence to map.
A Nu anonymous function (do
block) with zero arguments. See the Nu documentation.
The mapping will be created with global scope, ie no limiting scope selector.
+
ViMap.h
Map a key sequence to a Nu expression.
+- (void)map:(NSString *)keySequence toExpression:(id)expr scope:(NSString *)scopeSelector
The key sequence to map. Can include special keys within angle brackets, like <cmd-ctrl-up>
.
A Nu anonymous function (do
block) with zero arguments. See the Nu documentation.
A scope selector limiting where this key sequence is applicable, or nil for no limit.
ViMap.h
Map a key sequence to an action.
+- (void)setKey:(NSString *)keyDescription toAction:(SEL)selector
The key sequence to map.
The selector of the action.
This sets flags to 0, parameter to nil and empty scope selector.
+ViMap.h
Map a key sequence to an action.
+- (void)setKey:(NSString *)keyDescription toAction:(SEL)selector flags:(NSUInteger)flags parameter:(id)param scope:(NSString *)scopeSelector
The key sequence to map. Can include special keys within angle brackets, like <cmd-ctrl-up>
.
The selector of the action.
A combination of flags, or’d together.
Any parameter that should be passed to the command.
A scope selector limiting where this key sequence is applicable, or nil for no limit.
ViMap.h
Map a key sequence to an edit action.
+- (void)setKey:(NSString *)keyDescription toEditAction:(SEL)selector
The key sequence to map.
The selector of the action.
This sets flags to ViMapSetsDot
, parameter to nil
and an empty scope selector.
ViMap.h
Map a key sequence to an edit action.
+- (void)setKey:(NSString *)keyDescription toEditAction:(SEL)selector flags:(NSUInteger)flags parameter:(id)param scope:(NSString *)scopeSelector
The key sequence to map. Can include special keys within angle brackets, like <cmd-ctrl-up>
.
The selector of the action.
A combination of flags, or’d together. The ViMapSetsDot
flag is always set.
Any parameter that should be passed to the command.
A scope selector limiting where this key sequence is applicable, or nil for no limit.
ViMap.h
Map a key sequence to a motion action.
+- (void)setKey:(NSString *)keyDescription toMotion:(SEL)selector
The key sequence to map.
The selector of the action.
This sets flags to ViMapIsMotion
, parameter to nil
and an empty scope selector.
ViMap.h
Map a key sequence to a motion action.
+- (void)setKey:(NSString *)keyDescription toMotion:(SEL)selector flags:(NSUInteger)flags parameter:(id)param scope:(NSString *)scopeSelector
The key sequence to map. Can include special keys within angle brackets, like <cmd-ctrl-up>
.
The selector of the action.
A combination of flags, or’d together. The ViMapIsMotion
flag is always set.
Any parameter that should be passed to the command.
A scope selector limiting where this key sequence is applicable, or nil for no limit.
ViMap.h
Map a key sequence to an operator action.
+- (void)setKey:(NSString *)keyDescription toOperator:(SEL)selector
The key sequence to map.
The selector of the action.
This sets flags to ViMapNeedMotion
, parameter to nil
and an empty scope selector.
ViMap.h
Map a key sequence to an operator action.
+- (void)setKey:(NSString *)keyDescription toOperator:(SEL)selector flags:(NSUInteger)flags parameter:(id)param scope:(NSString *)scopeSelector
The key sequence to map. Can include special keys within angle brackets, like <cmd-ctrl-up>
.
The selector of the action.
A combination of flags, or’d together. The ViMapNeedMotion
flag is always set.
Any parameter that should be passed to the command.
A scope selector limiting where this key sequence is applicable, or nil for no limit.
ViMap.h
Unmap a key sequence without a limiting scope.
+- (void)unmap:(NSString *)keySequence
The key sequence to unmap.
ViMap.h
Unmap a key sequence in a specific scope.
+- (void)unmap:(NSString *)keySequence scope:(NSString *)scopeSelector
The key sequence to unmap.
A scope selector matching a previously mapped key sequence.
ViMap.h
Inherits from | +NSObject | +
Declared in | +ViMap.h | +
A mapping of a key sequence to an editor action, macro or Nu expression.
+ +New mappings are created in a ViMap.
+ +ViMapSetsDot
: This command sets the dot commandViMapNeedMotion
: This command needs a following motion command (ie, it’s an operator)ViMapIsMotion
: This is a motion commandViMapLineMode
: This command operates on whole linesViMapNeedArgument
: This command needs a following character argument scopeSelector
+ The scope this mapping applies to.
+ + property + + keyString
+ A string describing the key sequence.
+ + property + + keySequence
+ An array of NSNumbers that make up the key sequence.
+ + property + + action
+ The editor action.
+ + property + + recursive
+ YES if this macro should be evaluated recursively.
+ + property + + macro
+ A key string describing the keys that make up the macro.
+ + property + + expression
+ A Nu expression macro.
+ + property + + parameter
+ Any parameter that should be passed to the command.
+ + property + +– isAction
+ YES if the mapping is an editor action.
+ + + +– isMacro
+ YES if the mapping is a macro.
+ + + +– isExpression
+ YES if the mapping is a Nu expression.
+ + + +– isOperator
+ YES if the mapping is an operator action that requires a motion component.
+ + + +– isMotion
+ YES if the mapping is a motion action.
+ + + +– isLineMode
+ YES if the mapping is an editor action that works on whole lines.
+ + + +– needsArgument
+ YES if the mapping is an editor action that needs a character argument, like the vi f
command.
The editor action.
+@property (nonatomic, readonly) SEL action
ViMap.h
A Nu expression macro.
+@property (nonatomic, readonly) NuBlock *expression
ViMap.h
An array of NSNumbers that make up the key sequence.
+@property (nonatomic, readonly) NSArray *keySequence
ViMap.h
A string describing the key sequence.
+@property (nonatomic, readonly) NSString *keyString
ViMap.h
A key string describing the keys that make up the macro.
+@property (nonatomic, readonly) NSString *macro
ViMap.h
Any parameter that should be passed to the command.
+@property (nonatomic, readonly) id parameter
ViMap.h
YES if this macro should be evaluated recursively.
+@property (nonatomic, readonly) BOOL recursive
ViMap.h
YES if the mapping is an editor action.
+- (BOOL)isAction
ViMap.h
YES if the mapping is a Nu expression.
+- (BOOL)isExpression
ViMap.h
YES if the mapping is an editor action that works on whole lines.
+- (BOOL)isLineMode
ViMap.h
YES if the mapping is a macro.
+- (BOOL)isMacro
ViMap.h
YES if the mapping is a motion action.
+- (BOOL)isMotion
ViMap.h
YES if the mapping is an operator action that requires a motion component.
+- (BOOL)isOperator
ViMap.h
YES if the mapping is an editor action that needs a character argument, like the vi f
command.
- (BOOL)needsArgument
ViMap.h
Inherits from | +NSObject | +
Declared in | +ViMark.h | +
The column of the mark.
+@property (nonatomic, readonly) NSUInteger column
ViMark.h
The line number of the mark.
+@property (nonatomic, readonly) NSUInteger line
ViMark.h
Inherits from | +NSObject | +
Declared in | +ViParser.h | +
– initWithDefaultMap:
+ Initialize a new key parser.
+ + + +– reset
+ Reset the parser.
+ + + +– setMap:
+ Change the current key map.
+ + + +– partial
+ YES if there are partial keys received.
+ + + +– keyString
+ The current keys being parsed, or the empty string if not +partial keys received.
+ + + +Initialize a new key parser.
+- (ViParser *)initWithDefaultMap:(ViMap *)aMap
The default map to use when mapping keys.
ViParser.h
The current keys being parsed, or the empty string if not +partial keys received.
+- (NSString *)keyString
The current keys being parsed, or the empty string if not +partial keys received.
+ViParser.h
YES if there are partial keys received.
+- (BOOL)partial
YES if there are partial keys received.
+ViParser.h
Inherits from | +NSObject | +
Conforms to | +ViPreferencePane | +
Declared in | +ViPreferencePane.h | +
The icon of the preference pane.
+@property (nonatomic, readonly) NSImage *icon
The icon of the preference pane.
+ViPreferencesController.h
Initialize a preference pane.
+- (id)initWithNib:(NSNib *)nib name:(NSString *)aName icon:(NSImage *)anIcon
A Nib object. The Nib will be instantiated with the receiver as owner.
The name of the preference pane.
The icon of the preference pane.
ViPreferencePane.h
Inherits from | +NSWindowController | +
Conforms to | +NSToolbarDelegate | +
Declared in | +ViPreferencesController.h | +
The preferences controller manages the preferences window and allows +registering new preference panes.
++ sharedPreferences
+ The globally shared preferences controller.
+ + + +– registerPane:
+ Register a new preference pane.
+ + + +– show
+ Show the preferences window.
+ + + +– showItem:
+ Show the preferences window and switch to a preference pane.
+ + + +Register a new preference pane.
+- (void)registerPane:(id<ViPreferencePane>)pane
The preference pane to add.
ViPreferencesController.h
Inherits from | +NSObject | +
Declared in | +ViRegisterManager.h | +
Register manager
+ +The register manager handles the content of registers.
+ +There are a number of special registers:
+ +"
— The unnamed register. This is the default register.+
or *
— The Mac OS clipboard.%
— The URL of the current document.#
— The URL of the alternate document./
— The last search term.:
— The last entered ex command._
(underscore) — The null register; anything stored in this register is discarded.+ sharedManager
+ Returns the global shared register manager.
+ + + +– contentOfRegister:
+ Returns the global shared register manager.
+ + + +– setContent:ofRegister:
+ Set the content string of a register.
+ + + +– nameOfRegister:
+ Returns a description of a register.
+ + + +Returns the global shared register manager.
+- (NSString *)contentOfRegister:(unichar)regName
The name of the register.
ViRegisterManager.h
Returns a description of a register.
+- (NSString *)nameOfRegister:(unichar)regName
The name of the register.
ViRegisterManager.h
Set the content string of a register.
+- (void)setContent:(NSString *)content ofRegister:(unichar)regName
The content of the register being set.
The name of the register.
+ +Uppercase register A
to Z
causes the content to be appended.
ViRegisterManager.h
Inherits from | +NSObject | +
Conforms to | +NSCopying | +
Declared in | +ViScope.h | +
– match:
+ Match against a scope selector.
+ + + +– bestMatch:
+ Returns the best matching scope selector.
+ + + +The range of characters this scope covers.
+@property (nonatomic, readwrite) NSRange range
ViScope.h
Returns the best matching scope selector.
+- (NSString *)bestMatch:(NSArray *)scopeSelectors
An array of scope selectors to match.
The scope selector with the highest matching rank.
+ViScope.h
Inherits from | +NSObject | +
Declared in | +ViTabController.h | +
– splitView:withView:vertically:
+ Splits a view and displays another view.
+ + + +– splitView:vertically:
+ Splits a view and displays a clone of the view.
+ + + +The window this tab belongs to.
+@property (nonatomic, readonly) NSWindow *window
ViTabController.h
Splits a view and displays a clone of the view.
+- (id<ViViewController>)splitView:(id<ViViewController>)viewController vertically:(BOOL)isVertical
The view that should be split.
YES if the split is vertical, NO if horizontal.
The new view controller or nil
on failure.
The view controller must have an associated document that can clone views.
+ViTabController.h
Splits a view and displays another view.
+- (id<ViViewController>)splitView:(id<ViViewController>)viewController withView:(id<ViViewController>)newViewController vertically:(BOOL)isVertical
The view that should be split.
The view that should be displayed.
YES if the split is vertical, NO if horizontal.
newViewController or nil
on failure.
ViTabController.h
Inherits from | +NSTextStorage | +
Declared in | +ViTextStorage.h | +
– locationForStartOfLine:
+ Find the start location of a line.
+ + + +– rangeOfLine:
+ Return the range of a line.
+ + + +– rangeOfLineAtLocation:
+ Return the range of a line.
+ + + +– lineNumberAtLocation:
+ Find the line number of a location.
+ + + +– lineCount
+ Return the number of lines.
+ + + +– columnAtLocation:
+ Find the column of a location.
+ + + +– isBlankLineAtLocation:
+ Determine if a line is blank.
+ + + +– rangeOfLeadingWhitespaceForLineAtLocation:
+ Find the range of leading whitespace on a line.
+ + + +– firstNonBlankForLineAtLocation:
+ Find the first non-blank character on a line.
+ + + +Find the column of a location.
+- (NSUInteger)columnAtLocation:(NSUInteger)aLocation
The location to check for column.
The logical column from the start of the line.
+This method always uses the default tab size when determining the column.
ViTextStorage.h
Find the first non-blank character on a line.
+- (NSUInteger)firstNonBlankForLineAtLocation:(NSUInteger)aLocation
A location on the line to check.
The location of the first non-blank character on the given line.
+If the line is blank (no non-blanks found), then the location of the end of the line is returned.
+Returns NSNotFound
if aLocation
is beyond the end of the document.
ViTextStorage.h
Determine if a line is blank.
+- (BOOL)isBlankLineAtLocation:(NSUInteger)aLocation
A location on the line to check.
YES if the line at the given location is blank.
+ViTextStorage.h
Return the number of lines.
+- (NSUInteger)lineCount
The number of lines, or zero if the document is empty.
+ViTextStorage.h
Find the line number of a location.
+- (NSUInteger)lineNumberAtLocation:(NSUInteger)aLocation
The location of the line number to return.
The line number at a given location. Returns 0 if the +document is empty.
+ViTextStorage.h
Find the start location of a line.
+- (NSInteger)locationForStartOfLine:(NSUInteger)aLineNumber
The line number to lookup.
The location for the start of the given line.
+ViTextStorage.h
Find the range of leading whitespace on a line.
+- (NSRange)rangeOfLeadingWhitespaceForLineAtLocation:(NSUInteger)aLocation
A location on the line to check.
A range of leading whitespace for the given line.
+Returns (NSNotFound
, 0
) if aLocation
is beyond the end of the document.
ViTextStorage.h
Return the range of a line.
+- (NSRange)rangeOfLine:(NSUInteger)lineNumber
The line number to return the range for.
The range of the line, or (NSNotFound
, 0
) if the
+lineNumber is invalid.
ViTextStorage.h
Return the range of a line.
+- (NSRange)rangeOfLineAtLocation:(NSUInteger)aLocation
The location of a character on the line to return the range for.
The range of the line, or (NSNotFound
, 0
) if the
+location is invalid.
ViTextStorage.h
Inherits from | +NSTextView | +
Conforms to | +ViCompletionDelegate ViKeyManagerTarget ViSnippetDelegate |
+
Declared in | +ViTextView.h | +
keyManager
+ Associated key manager.
+ + property + + document
+ Associated document.
+ + property + + mode
+ Vi mode (insert, normal or visual).
+ + property + + visual_line_mode
+
+
+ property
+
+– textStorage
+ The associated ViTextStorage object.
+ + + +– setNormalMode
+ Set normal mode.
+ + + +– setVisualMode
+ Set visual mode.
+ + + +– setInsertMode
+ Set insert mode.
+ + + +– input:
+ Input a string of keys as a macro.
+ + + +– setCaret:
+ Set the location of the caret.
+ + + +– scrollToCaret
+ Scroll the view to the caret.
+ + + +– caret
+ The location of the caret.
+ + + +– currentLine
+ The current line number.
+ + + +– currentColumn
+ The current column.
+ + + +– currentScreenColumn
+ The current screen column. This may be different from currentColumn if line wrapping is in effect.
+ + + +– gotoColumn:fromLocation:
+ Go to a specific column.
+ + + +– gotoLine:column:
+ Go to a specific line and column.
+ + + +– characterAtIndex:
+ Get the character at a location.
+ + + +– currentCharacter
+ The character under the caret.
+ + + +– line
+ The content of the current line.
+ + + +– markNamed:
+ Lookup a marked location.
+ + + +– setMark:atLocation:
+ Set a mark.
+ + + +– insertString:atLocation:
+ Insert a string at a location.
+ + + +– insertString:
+ Insert a string at the current location.
+ + + +– deleteRange:
+ Delete a range of text.
+ + + +– replaceRange:withString:
+ Replace a range of text with a string.
+ + + +– insertNewlineAtLocation:indentForward:
+ Insert newline and indent.
+ + + +– yankToRegister:range:
+ Copying text to a register.
+ + + +– cutToRegister:range:
+ Cut text to a register.
+ + + +– popUpContextMenu:
+ Show a popup menu at the carets location.
+ + + +– environment
+ Bundle environment variables.
+ + + +– preference:atLocation:
+ A bundle preference at a given location.
+ + + +– preference:
+ A bundle preference at the current location.
+ + + +– insertSnippet:inRange:
+ Insert a snippet, replacing the trigger word.
+ + + +– insertSnippet:atLocation:
+ Insert a snippet at a given location.
+ + + +– insertSnippet:
+ Insert a snippet at the current location.
+ + + +Associated document.
+@property (nonatomic, readonly) ViDocument *document
ViTextView.h
Associated key manager.
+@property (nonatomic, readwrite, assign) ViKeyManager *keyManager
ViTextView.h
Vi mode (insert, normal or visual).
+@property (nonatomic, readonly) ViMode mode
ViTextView.h
The location of the caret.
+- (NSUInteger)caret
The location of the caret.
+ViTextView.h
Get the character at a location.
+- (unichar)characterAtIndex:(NSUInteger)location
The location to check.
The character at the given location, or 0 if location is invalid.
+ViTextView.h
The character under the caret.
+- (unichar)currentCharacter
The character under the caret.
+ViTextView.h
The current column.
+- (NSUInteger)currentColumn
The current column.
+ViTextView.h
The current line number.
+- (NSUInteger)currentLine
The current line number.
+ViTextView.h
The current screen column. This may be different from currentColumn if line wrapping is in effect.
+- (NSUInteger)currentScreenColumn
The current screen column. This may be different from currentColumn if line wrapping is in effect.
+ViTextView.h
Cut text to a register.
+- (void)cutToRegister:(unichar)regName range:(NSRange)cutRange
The name of the register to cut to.
The range of text to cut.
ViTextView.h
Delete a range of text.
+- (void)deleteRange:(NSRange)aRange
The range to delete.
ViTextView.h
Bundle environment variables.
+- (NSDictionary *)environment
Bundle environment variables.
+ViTextView.h
Go to a specific column.
+- (void)gotoColumn:(NSUInteger)column fromLocation:(NSUInteger)aLocation
The column to go to. Zero-based.
A location on the line.
ViTextView.h
Go to a specific line and column.
+- (BOOL)gotoLine:(NSUInteger)line column:(NSUInteger)column
The line number to go to. One-based.
The column to go to. Zero-based.
YES if the position was valid.
+ViTextView.h
Input a string of keys as a macro.
+- (BOOL)input:(NSString *)inputString
A key sequence, can include special keys, see ViMap.
YES if the macro evaluated successfully.
+ViTextView.h
Insert newline and indent.
+- (NSUInteger)insertNewlineAtLocation:(NSUInteger)aLocation indentForward:(BOOL)indentForward
The location of the newline character to insert.
Returns aLocation
adjusted for automatic indentation.
ViTextView.h
Insert a snippet at the current location.
+- (ViSnippet *)insertSnippet:(NSString *)snippetString
The snippet to insert.
ViTextView.h
Insert a snippet at a given location.
+- (ViSnippet *)insertSnippet:(NSString *)snippetString atLocation:(NSUInteger)aLocation
The snippet to insert.
The location to insert the snippet. Zero-based.
ViTextView.h
Insert a snippet, replacing the trigger word.
+- (ViSnippet *)insertSnippet:(NSString *)snippetString inRange:(NSRange)aRange
The snippet to insert.
The range of the trigger word to replace.
ViTextView.h
Insert a string at the current location.
+- (void)insertString:(NSString *)aString
The string to insert.
ViTextView.h
Insert a string at a location.
+- (void)insertString:(NSString *)aString atLocation:(NSUInteger)aLocation
The string to insert.
The location where the string will be inserted. Zero-based.
ViTextView.h
The content of the current line.
+- (NSString *)line
The content of the current line.
+ViTextView.h
Lookup a marked location.
+- (ViMark *)markNamed:(unichar)markName
The name of the mark.
The named mark, or nil
if not set.
ViTextView.h
Show a popup menu at the carets location.
+- (void)popUpContextMenu:(NSMenu *)menu
The menu to display.
ViTextView.h
A bundle preference at the current location.
+- (id)preference:(NSString *)name
The name of the Bundle Preference (eg, shellVariables
)
A bundle preference at the current location.
+ViTextView.h
A bundle preference at a given location.
+- (id)preference:(NSString *)name atLocation:(NSUInteger)aLocation
The name of the Bundle Preference (eg, shellVariables
)
The location where the preference should be valid.
A bundle preference at a given location.
+ViTextView.h
Replace a range of text with a string.
+- (void)replaceRange:(NSRange)aRange withString:(NSString *)aString
The range to replace.
The replacement string.
ViTextView.h
Scroll the view to the caret.
+- (void)scrollToCaret
Makes sure the caret is visible.
+ViTextView.h
Set the location of the caret.
+- (void)setCaret:(NSUInteger)location
The location of the caret. Zero-based.
ViTextView.h
Set insert mode.
+- (void)setInsertMode
ViTextView.h
Set a mark.
+- (void)setMark:(unichar)name atLocation:(NSUInteger)aLocation
The name of the mark.
The location to mark.
ViTextView.h
Set normal mode.
+- (void)setNormalMode
ViTextView.h
Set visual mode.
+- (void)setVisualMode
ViTextView.h
The associated ViTextStorage object.
+- (ViTextStorage *)textStorage
The associated ViTextStorage object.
+ViTextView.h
Copying text to a register.
+- (void)yankToRegister:(unichar)regName range:(NSRange)yankRange
The name of the register to copy to.
The range of text to copy.
ViTextView.h
Inherits from | +NSWindowController | +
Conforms to | +NSTextFieldDelegate NSToolbarDelegate NSWindowDelegate ViDeferredDelegate ViJumpListDelegate |
+
Declared in | +ViWindowController.h | +
+ currentWindowController
+ The currently active window controller.
+ + + +– documents
+ The documents open in the window.
+ + + +– closeDocument:andWindow:
+ Close a document, and optionally the window.
+ + + +– currentView
+ The currently focused view.
+ + + +– currentDocument
+ The currently focused document, or nil
if no document is focused.
– gotoURL:line:column:
+ Open a document and go to a specific point in the file.
+ + + +– gotoURL:
+ Open a document.
+ + + +– splitVertically:andOpen:orSwitchToDocument:allowReusedView:
+ Split the current view and display another document.
+ + + +Close a document, and optionally the window.
+- (void)closeDocument:(ViDocument *)document andWindow:(BOOL)canCloseWindow
The document to close.
YES if the window should be closed if there are no more documents in the window.
ViWindowController.h
The currently focused document, or nil
if no document is focused.
- (ViDocument *)currentDocument
The currently focused document, or nil
if no document is focused.
ViWindowController.h
The currently focused view.
+- (id<ViViewController>)currentView
The currently focused view.
+ViWindowController.h
The documents open in the window.
+- (NSArray *)documents
The documents open in the window.
+ViWindowController.h
Open a document.
+- (BOOL)gotoURL:(NSURL *)url
The URL of the document to open. The document may already be opened.
YES if the document could be opened.
+ViWindowController.h
Open a document and go to a specific point in the file.
+- (BOOL)gotoURL:(NSURL *)url line:(NSUInteger)line column:(NSUInteger)column
The URL of the document to open. The document may already be opened.
The line number to jump to, or 0
to not jump to any line.
The column to jump to.
YES if the document could be opened.
+ViWindowController.h
Split the current view and display another document.
+- (id<ViViewController>)splitVertically:(BOOL)isVertical andOpen:(id)filenameOrURL orSwitchToDocument:(ViDocument *)doc allowReusedView:(BOOL)allowReusedView
YES to split vertically, NO for a horizontal split.
A path (as an NSString) or a URL pointing to a document to open. The document may already be open.
An already open document that should be displayed in the split view.
YES to focus an already visible view for the given document. NO to always create a new split view.
The new split view.
+ViWindowController.h
Conforms to | +NSObject | +
Declared in | +ViKeyManager.h | +
– keyManager:shouldParseKey:inScope:
+ Intercept keys before parsing.
+ + + +– keyManager:presentError:
+ Present errors from key parsing.
+ + + +– keyManager:evaluateCommand:
+ Evaluate a generated command.
+ + + +– keyManager:partialKeyString:
+ Notify about partial keys.
+ + + +Evaluate a generated command.
+- (BOOL)keyManager:(ViKeyManager *)keyManager evaluateCommand:(ViCommand *)command
The key manager that handled the event.
The generated ViCommand.
YES if the command succeded, otherwise NO.
+Only normal editor actions are passed to this method. Macros and Nu +expressions are evaluated automatically by the key manager.
+ViKeyManager.h
Notify about partial keys.
+- (void)keyManager:(ViKeyManager *)keyManager partialKeyString:(NSString *)keyString
The key manager handling the event.
A string of partial keys.
This method can be used to present partial vi commands.
+ViKeyManager.h
Present errors from key parsing.
+- (void)keyManager:(ViKeyManager *)aKeyManager presentError:(NSError *)error
The key manager handling the event.
An error from the vi key parser or map.
ViKeyManager.h
Intercept keys before parsing.
+- (NSNumber *)keyManager:(ViKeyManager *)aKeyManager shouldParseKey:(NSNumber *)keyCode inScope:(ViScope *)scope
The key manager handling the event.
The key code that is being parsed.
The active scope.
A NSNumber with a boolean YES if the key should be parsed, otherwise NO.
+ViKeyManager.h
Conforms to | +NSObject | +
Declared in | +ViPreferencesController.h | +
The icon of the preference pane.
+- (NSImage *)icon
The icon of the preference pane.
+ViPreferencesController.h
Conforms to | +NSObject | +
Declared in | +ViTabController.h | +
view
+ The NSView that should be displayed in the split.
+ + property + required method + innerView
+ The inner NSView will be made key when the view gets focus.
+ + property + required method + tabController
+ The containing tab controller.
+ + property + required method +– title
+
+
+
+ required method
+– document
+ The document that is being displayed, if available.
+ + + +The inner NSView will be made key when the view gets focus.
+@property (nonatomic, readonly) NSView *innerView
ViTabController.h
The document that is being displayed, if available.
+- (id<ViViewDocument>)document
ViTabController.h
Conforms to | +NSObject | +
Declared in | +ViTabController.h | +
– addView:
+ Add a view to the set of visible views.
+ + + required method +– removeView:
+ Remove a view from the set of visible views.
+ + + required method +– makeView
+ Create a new view of the document.
+ + + required method +– cloneView:
+ Create a new view of the document by cloning an existing view.
+ + + required method +– views
+ The set of visible views of the document.
+ + + required method +– isDocumentEdited
+ YES if the document is modified, otherwise NO.
+ + + required method +Add a view to the set of visible views.
+- (void)addView:(id<ViViewController>)viewController
The view to add.
ViTabController.h
Create a new view of the document by cloning an existing view.
+- (id<ViViewController>)cloneView:(id<ViViewController>)oldView
The view that is being cloned.
The newly created view of the document.
+The new view is expected to inherit properties from the cloned view, such as caret location.
+ViTabController.h
YES if the document is modified, otherwise NO.
+- (BOOL)isDocumentEdited
YES if the document is modified, otherwise NO.
+ViTabController.h
Create a new view of the document.
+- (id<ViViewController>)makeView
The newly created view of the document.
+ViTabController.h
Remove a view from the set of visible views.
+- (void)removeView:(id<ViViewController>)viewController
The view to remove.
ViTabController.h
The requested content cannot be loaded.
Please try again later.
'+s+' |
Vico is a modal editor. This means there are different modes +in which you interact with the editor. The most fundamental modes +are the insert mode and normal mode. Regular keys pressed while +in insert mode causes text to be inserted. In contrast, while in +normal mode, regular keys are attached to editing commands such as +delete, change or copy text.
+ +If you have used the vi or vim text editors, +you should feel comfortable with Vico. If this is your first encounter +with a modal editor, you might feel a bit overwhelmed at first. But +if you give it some time and learn the basics, you'll be rewarded with +a highly efficient text editing tool.
+ + + +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
Vico is a modal editor. This means there are different modes +in which you interact with the editor. The most fundamental modes +are the insert mode and normal mode. Regular keys pressed while +in insert mode causes text to be inserted. In contrast, while in +normal mode, regular keys are attached to editing commands such as +delete, change or copy text.
+ +If you have used the vi or vim text editors, +you should feel comfortable with Vico. If this is your first encounter +with a modal editor, you might feel a bit overwhelmed at first. But +if you give it some time and learn the basics, you'll be rewarded with +a highly efficient text editing tool.
+ + +The c (change) operator deletes the affected text +and enters insert mode. The cw is one of the most used commands: it +changes one word. The change command is not considered complete until you exit +insert mode with ⎋ (escape). Back in normal mode, you can +repeat the change with the dot command.
+ +The (uppercase) C command deletes from the current location +to the end of the line, and then enters insert mode. It is the same as +c$.
+ +Use the r (replace) command to change a single character. Vico waits +for you to type the new character. In visual mode, the +r command changes the whole selection to the same character.
+ +The s (substitute) command replaces one, or, given a count, +that many characters and then enters insert mode. The uppercase variant +S is line-oriented and replaces one or more lines.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
The c (change) operator deletes the affected text +and enters insert mode. The cw is one of the most used commands: it +changes one word. The change command is not considered complete until you exit +insert mode with ⎋ (escape). Back in normal mode, you can +repeat the change with the dot command.
+ +The (uppercase) C command deletes from the current location +to the end of the line, and then enters insert mode. It is the same as +c$.
+ +Use the r (replace) command to change a single character. Vico waits +for you to type the new character. In visual mode, the +r command changes the whole selection to the same character.
+ +The s (substitute) command replaces one, or, given a count, +that many characters and then enters insert mode. The uppercase variant +S is line-oriented and replaces one or more lines.
+While in insert mode, use the ctrl-t and ctrl-d commands +to increase and decrease the indentation level of the current line.
+ +To manually shift a block of text left or right, use the < and +> operators. It's easy to use them in +visual mode by first selecting the text that should be indented.
+ +The = command can be used to automatically indent text based on +the current language syntax.
+ +The above commands uses the indentation settings for the current scope to +determine how to indent.
+ + + +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
While in insert mode, use the ctrl-t and ctrl-d commands +to increase and decrease the indentation level of the current line.
+ +To manually shift a block of text left or right, use the < and +> operators. It's easy to use them in +visual mode by first selecting the text that should be indented.
+ +The = command can be used to automatically indent text based on +the current language syntax.
+ +The above commands uses the indentation settings for the current scope to +determine how to indent.
+ + +The simplest deletion command is x. It deletes the character under +the caret. A count before deletes that many characters, e.g. 10x +deletes 10 characters. Similarly, the X command deletes one character +to the left of the caret.
+ +The D command deletes from the current location to the end of the +line.
+ +The d command is an operator and thus must be +combined with a motion command. For example, dw deletes a word, +d3W deletes 3 big words, and dd deletes the current line.
+ +The c (change) command is similar to the d command, but +also enters insert mode.
+ + + +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
The simplest deletion command is x. It deletes the character under +the caret. A count before deletes that many characters, e.g. 10x +deletes 10 characters. Similarly, the X command deletes one character +to the left of the caret.
+ +The D command deletes from the current location to the end of the +line.
+ +The d command is an operator and thus must be +combined with a motion command. For example, dw deletes a word, +d3W deletes 3 big words, and dd deletes the current line.
+ +The c (change) command is similar to the d command, but +also enters insert mode.
+ + +One of the most powerful vi commands is the dot command. The dot command +(.) simply repeats the last change.
+ +You can move around without overwriting the dot command.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
One of the most powerful vi commands is the dot command. The dot command +(.) simply repeats the last change.
+ +You can move around without overwriting the dot command.
+The ex command line is normally hidden under the status bar at the +bottom of the window. The command line is used to enter ex commands +(:), filter commands (!) and search patterns +(/ and ?).
+ +Lines entered on the command line are remembered in a history. Use up and +down arrows to recall history.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
The ex command line is normally hidden under the status bar at the +bottom of the window. The command line is used to enter ex commands +(:), filter commands (!) and search patterns +(/ and ?).
+ +Lines entered on the command line are remembered in a history. Use up and +down arrows to recall history.
+ +The following ex commands are available:
+ +:copy
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
The following ex commands are available:
+ +:copy
Many ex commands accept a range of lines to operate +upon. The range precede the command name and consists of zero, one or +two line addresses separated with comma.
+ +A line address can be written as:
+ +Additionally, a line offset may be appended to a line address with ++ or -. For example, .+2 means two +lines after the current line.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
Many ex commands accept a range of lines to operate +upon. The range precede the command name and consists of zero, one or +two line addresses separated with comma.
+ +A line address can be written as:
+ +Additionally, a line offset may be appended to a line address with ++ or -. For example, .+2 means two +lines after the current line.
+Activate the file explorer with the ⌘E key. When the explorer +has focus, you can navigate using many of the regular +vi motion keys.
+ +To open a file, select the file and press t, s, +v or o to open it in a tab, a split view, a vertical +split, or replace the current document, respectively. Pressing +enter opens the selected file in a tab or in the current +split view, depending on the preferences.
+ +Here is a list of all key mappings in the explorer:
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
Activate the file explorer with the ⌘E key. When the explorer +has focus, you can navigate using many of the regular +vi motion keys.
+ +To open a file, select the file and press t, s, +v or o to open it in a tab, a split view, a vertical +split, or replace the current document, respectively. Pressing +enter opens the selected file in a tab or in the current +split view, depending on the preferences.
+ +Here is a list of all key mappings in the explorer:
+ +The shiftwidth setting controls how large an indentation is in terms +of spaces. This is different from the tabstop setting that specifies +how large an actual tab character is.
+ +If shiftwidth is set to 4 and tabstop is left at the +default 8, one indentation will use 4 spaces, but two indentations will use one +tab.
+ +Use the expandtab setting to always use spaces when indenting.
+ +When the autoindent setting is enabled, a new line will use the same +amount of indentation as the previous line. The smartindent setting +adds syntax-aware rules for increasing and decreasing the automatic indentation.
+ + + +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
The shiftwidth setting controls how large an indentation is in terms +of spaces. This is different from the tabstop setting that specifies +how large an actual tab character is.
+ +If shiftwidth is set to 4 and tabstop is left at the +default 8, one indentation will use 4 spaces, but two indentations will use one +tab.
+ +Use the expandtab setting to always use spaces when indenting.
+ +When the autoindent setting is enabled, a new line will use the same +amount of indentation as the previous line. The smartindent setting +adds syntax-aware rules for increasing and decreasing the automatic indentation.
+ + +To insert text you must first enter insert mode. The most basic way to +enter insert mode is with the i (insert) command. You will +notice you are in insert mode when the caret changes from a block caret +to a thin caret.
+ +When you are done inserting text, press the ⎋ +(escape) key to go back to normal mode.
+ +The i command enters insert mode at the current location. +To enter insert mode after the current location, you use the a +(append) command.
+ +If you want to append text to the end of the current line, no matter where +on the line you are, use the A command.
+ +Similarly, the I command moves to the first non-blank character +on the current line and enters insert mode there.
+ + + +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
To insert text you must first enter insert mode. The most basic way to +enter insert mode is with the i (insert) command. You will +notice you are in insert mode when the caret changes from a block caret +to a thin caret.
+ +When you are done inserting text, press the ⎋ +(escape) key to go back to normal mode.
+ +The i command enters insert mode at the current location. +To enter insert mode after the current location, you use the a +(append) command.
+ +If you want to append text to the end of the current line, no matter where +on the line you are, use the A command.
+ +Similarly, the I command moves to the first non-blank character +on the current line and enters insert mode there.
+ + +Vico maintains a list of locations while you move around in files. Some movement +commands are considered "jumps", and those jumps are remembered in a list.
+ +Generally, movement commands that generate jumps are those that +move more than a few lines. So the word, +character and line search +motion commands do not generate a jump, but the line +and search motions do.
+ +You navigate the jumplist either by pressing the jumplist arrows in the toolbar, +or pressing ctrl-o to go back and ctrl-i +(or tab) to go forward.
+ +Only the last 100 jumps are remembered, and duplicates are removed.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
Vico maintains a list of locations while you move around in files. Some movement +commands are considered "jumps", and those jumps are remembered in a list.
+ +Generally, movement commands that generate jumps are those that +move more than a few lines. So the word, +character and line search +motion commands do not generate a jump, but the line +and search motions do.
+ +You navigate the jumplist either by pressing the jumplist arrows in the toolbar, +or pressing ctrl-o to go back and ctrl-i +(or tab) to go forward.
+ +Only the last 100 jumps are remembered, and duplicates are removed.
+To quickly search for the next or previous occurrance of a character on the +current line, you can use the f or F commands. The lowercase +f command moves forward, while the uppercase F command +moves backwards.
+ +After you've pressed the f key, Vico waits for you to enter another +character. This is the character to search for. For example, the command +f: searches for the next occurrance of a colon on the current line.
+ +The t and T commands works similarly, but instead of +moving exactly to the specified character, it stops just before.
+ +The last character searched for with those commands is remembered, and the +search can be repeated with the ; (semicolon) and , +(comma) commands. They repeat the search in the same and opposite direction, +respectively.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
To quickly search for the next or previous occurrance of a character on the +current line, you can use the f or F commands. The lowercase +f command moves forward, while the uppercase F command +moves backwards.
+ +After you've pressed the f key, Vico waits for you to enter another +character. This is the character to search for. For example, the command +f: searches for the next occurrance of a colon on the current line.
+ +The t and T commands works similarly, but instead of +moving exactly to the specified character, it stops just before.
+ +The last character searched for with those commands is remembered, and the +search can be repeated with the ; (semicolon) and , +(comma) commands. They repeat the search in the same and opposite direction, +respectively.
+ +To move one character to the left, you either use the arrow key, or the +h command. The l command move to the right.
+ +The j and k commands move one line down and up, +respectively.
+ +To help you remember which key move in what direction, think of h +being the leftmost key among these, and l the rightmost. +The j key can be thought of a downward pointing arrow, and, with a +little imagination, the lowercase k is pointing upwards.
+ + + +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
To move one character to the left, you either use the arrow key, or the +h command. The l command move to the right.
+ +The j and k commands move one line down and up, +respectively.
+ +To help you remember which key move in what direction, think of h +being the leftmost key among these, and l the rightmost. +The j key can be thought of a downward pointing arrow, and, with a +little imagination, the lowercase k is pointing upwards.
+ + +You can jump to the top, middle and bottom line of the screen with the +H, M and L commands. To remember them, +you can think of H as the High line, and L as +the Low line.
+ +The } and { commands move by paragraphs. A +paragraph is considered delimited by an empty line.
+ +The G command jumps to the last line. With a count, it jumps +to that line number. For example, 10G jumps to line number +10. The gg command is similar to G, but defaults +to the first line if no count is given.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
You can jump to the top, middle and bottom line of the screen with the +H, M and L commands. To remember them, +you can think of H as the High line, and L as +the Low line.
+ +The } and { commands move by paragraphs. A +paragraph is considered delimited by an empty line.
+ +The G command jumps to the last line. With a count, it jumps +to that line number. For example, 10G jumps to line number +10. The gg command is similar to G, but defaults +to the first line if no count is given.
+ +The ctrl-] key (in normal mode), jumps to the symbol under the caret.
+ +If you have a tags file, Vico will try to
+lookup the current word as a tag. The tags
file should be placed in
+the windows current directory, ie the top-most directory displayed by
+the explorer.
If no tag was found, Vico tries to match the current word with a +symbol. If more than one match is found, you are presented with +a menu.
+ +If a tag or symbol is found, the current location is pushed on the +tag stack, and the caret is jumped to the new location. +Press ctrl-t to go back.
+ +You can also use the ⇧⌘T key to search the +symbol list.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
The ctrl-] key (in normal mode), jumps to the symbol under the caret.
+ +If you have a tags file, Vico will try to
+lookup the current word as a tag. The tags
file should be placed in
+the windows current directory, ie the top-most directory displayed by
+the explorer.
If no tag was found, Vico tries to match the current word with a +symbol. If more than one match is found, you are presented with +a menu.
+ +If a tag or symbol is found, the current location is pushed on the +tag stack, and the caret is jumped to the new location. +Press ctrl-t to go back.
+ +You can also use the ⇧⌘T key to search the +symbol list.
+To move to the next word, use the w command.
+ +The w command considers separator characters when deciding where the +next word starts. To only consider whitespace as word separators, you can use +the (uppercase) W command.
+ +To move in the opposite direction, use the b command to move over a +normal word, and the capital B command to move over "big words".
+ +There is also the e and E commands that move to the end +of the next word or bigword.
+ +If you prefix the above commands with a number, the command will move that many +words. For example, the command 3w will move three words to the right.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
To move to the next word, use the w command.
+ +The w command considers separator characters when deciding where the +next word starts. To only consider whitespace as word separators, you can use +the (uppercase) W command.
+ +To move in the opposite direction, use the b command to move over a +normal word, and the capital B command to move over "big words".
+ +There is also the e and E commands that move to the end +of the next word or bigword.
+ +If you prefix the above commands with a number, the command will move that many +words. For example, the command 3w will move three words to the right.
+ +You can use the normal arrow, page up and page down keys in Vico to move around. +But there are more movement commands available in vi than there are cursor keys. +And with the vi way of navigating, you don't have to reach all the way across +the keyboard.
+ +Most vi tutorials begin with describing the hjkl keys for moving +left, down, up and right. If you're new to vi, you may want to wait with them. +They do feel a bit awkward at first, but once you've learned to use them, you +realize they aren't so bad at all.
+ + + +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
You can use the normal arrow, page up and page down keys in Vico to move around. +But there are more movement commands available in vi than there are cursor keys. +And with the vi way of navigating, you don't have to reach all the way across +the keyboard.
+ +Most vi tutorials begin with describing the hjkl keys for moving +left, down, up and right. If you're new to vi, you may want to wait with them. +They do feel a bit awkward at first, but once you've learned to use them, you +realize they aren't so bad at all.
+ + +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
To open a new line below the current line, use the o (lowercase +letter o) command. The new line is automatically indented (if autoindent +is enabled) and insert mode is entered.
+ +Use the O (capital letter O) command to insert a new line +above the current line.
+Some commands must be combined with a motion command to be complete. These +commands are called operators, as they operate on the text affected by the +motion command.
+ +The standard operator commands are:
+ +You combine the operator with a motion just by entering the motion command +after the operator. For example, cw changes a word.
+ +All operator commands can be doubled to imply the current line. This way, +dd deletes the current line, >> shift the current +line one shiftwidth to the right and yy +copies (yanks) the line.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
Some commands must be combined with a motion command to be complete. These +commands are called operators, as they operate on the text affected by the +motion command.
+ +The standard operator commands are:
+ +You combine the operator with a motion just by entering the motion command +after the operator. For example, cw changes a word.
+ +All operator commands can be doubled to imply the current line. This way, +dd deletes the current line, >> shift the current +line one shiftwidth to the right and yy +copies (yanks) the line.
+Vico has built-in support for editing files over SFTP. To open a remote directory, +use the :cd command to change to a sftp:// URL. For +example, :cd sftp://www.example.com changes to the home directory on +the www.example.com server. Use the explorer +sidebar to open files, or directly with the :edit command.
+ +A file relative to the home directory on the remote server can be referenced +by the following URL: sftp://www.example.com/~/directory/file.txt
+ +For SFTP to work, you must use public key authentication. It is recommended +that you protect your private key with a passphrase.
+ +Vico's SFTP support uses the ssh support built-in to Mac OS X, so any +configuration files you already have for ssh will be used.
+ + + +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
Vico has built-in support for editing files over SFTP. To open a remote directory, +use the :cd command to change to a sftp:// URL. For +example, :cd sftp://www.example.com changes to the home directory on +the www.example.com server. Use the explorer +sidebar to open files, or directly with the :edit command.
+ +A file relative to the home directory on the remote server can be referenced +by the following URL: sftp://www.example.com/~/directory/file.txt
+ +For SFTP to work, you must use public key authentication. It is recommended +that you protect your private key with a passphrase.
+ +Vico's SFTP support uses the ssh support built-in to Mac OS X, so any +configuration files you already have for ssh will be used.
+ + +Ctrl-f and Ctrl-b (in normal mode) scroll the +screen one page forward and backward.
+ +The Ctrl-d and Ctrl-u commands scroll the screen +one half screen page down and up, respectively.
+ +To reposition the screen relative the current caret location, the +zz command centers the caret on the screen, zt +puts the caret at the top of the screen, and zb at the bottom.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
Ctrl-f and Ctrl-b (in normal mode) scroll the +screen one page forward and backward.
+ +The Ctrl-d and Ctrl-u commands scroll the screen +one half screen page down and up, respectively.
+ +To reposition the screen relative the current caret location, the +zz command centers the caret on the screen, zt +puts the caret at the top of the screen, and zb at the bottom.
+ +To search, use the / command and enter a regular expression +in the command line at the bottom of the window. This command is also +available by the standard ⌘F key.
+ +If the ignorecase option is set, case is ignored. If the +smartcase option is also set, case is ignored only if the +search pattern does not include any uppercase characters.
+ +To search backwards, use ?.
+ +To quickly search for the word under the caret, use *. The +# command searches backwards instead.
+ +You can repeat the last seach command in the same direction with the +n command. The upper case N command reverses the +direction.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
To search, use the / command and enter a regular expression +in the command line at the bottom of the window. This command is also +available by the standard ⌘F key.
+ +If the ignorecase option is set, case is ignored. If the +smartcase option is also set, case is ignored only if the +search pattern does not include any uppercase characters.
+ +To search backwards, use ?.
+ +To quickly search for the word under the caret, use *. The +# command searches backwards instead.
+ +You can repeat the last seach command in the same direction with the +n command. The upper case N command reverses the +direction.
+ +Vico can show the same or different documents side by side in split views. +Views can be split either horizontally or vertically. There is no limit on the +number of splits you can create, but more than a couple in the same tab tends to +be hard to manage.
+ +Most keys that manages split views begin with <ctrl-w>. +To split the current view, use the <ctrl-w>s command, ie first +press <ctrl-w> and then press the s key. If you use +v instead, you get a vertical split.
+ +If you want to move a split view to a new tab, use <ctrl-w>T.
+ +To navigate between split views, use <ctrl-w> followed +by a vi motion key (hjkl) or one of the arrow keys. The +<ctrl-w>w command moves to the next split view. The +<ctrl-w>W moves to the previous split view. Use +<ctrl-w>p to toggle between the last focused split view.
+ +The explorer and symbol list can also be used +to open files or symbols in split views.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
Vico can show the same or different documents side by side in split views. +Views can be split either horizontally or vertically. There is no limit on the +number of splits you can create, but more than a couple in the same tab tends to +be hard to manage.
+ +Most keys that manages split views begin with <ctrl-w>. +To split the current view, use the <ctrl-w>s command, ie first +press <ctrl-w> and then press the s key. If you use +v instead, you get a vertical split.
+ +If you want to move a split view to a new tab, use <ctrl-w>T.
+ +To navigate between split views, use <ctrl-w> followed +by a vi motion key (hjkl) or one of the arrow keys. The +<ctrl-w>w command moves to the next split view. The +<ctrl-w>W moves to the previous split view. Use +<ctrl-w>p to toggle between the last focused split view.
+ +The explorer and symbol list can also be used +to open files or symbols in split views.
+To create a public/private key for SFTP (or ssh in general), you need to open +Terminal.app and run the ssh-keygen command:
+ +ssh-keygen -t rsa
+
+
+It should look something like this;
+ +martinh@macbookpro:~$ ssh-keygen -t rsa
+Generating public/private rsa key pair.
+Enter file in which to save the key (/Users/martinh/.ssh/id_rsa):
+Enter passphrase (empty for no passphrase):
+Enter same passphrase again:
+Your identification has been saved in /Users/martinh/.ssh/id_rsa.
+Your public key has been saved in /Users/martinh/.ssh/id_rsa.pub.
+The key fingerprint is:
+77:15:d9:55:4f:b9:01:90:2c:48:ae:3b:39:22:52:fa martinh@macbookpro.local
+The key's randomart image is:
++--[ RSA 2048]----+
+| ... ..o.ooB|
+| .. . o .=o|
+| . . . +|
+| . . . |
+| . . S . . |
+| o o . . |
+|o. . = |
+|... . o |
+| E |
++-----------------+
+martinh@macbookpro:~$
+
+
+Make sure you use a good passphrase. If you leave the passphrase empty, anyone +with access to your key file have access to any remote server you authorize with +that key.
+ +To authorize a remote server to log you in with this key, you copy the +public key to the ~/.ssh/authorized_keys file on the remote server:
+ +cat ~/.ssh/id_rsa.pub | ssh hostname 'mkdir -m700 -p .ssh && cat >> .ssh/authorized_keys'
+
+
+The above command makes sure the remote .ssh directory exists and has +the correct permissions, and appends your new public key to any existing +authorized keys.
+ +If you have multiple keys, or use non-standard filenames, you may have to tell +ssh what key to use. You can do this by adding a host directive in the ssh +configuration file, ~/.ssh/config:
+ +Host www.example.com
+ IdentityFile ~/.ssh/id_rsa.example.com
+
+
+
+
+ To create a public/private key for SFTP (or ssh in general), you need to open +Terminal.app and run the ssh-keygen command:
+ +ssh-keygen -t rsa
+
+
+It should look something like this;
+ +martinh@macbookpro:~$ ssh-keygen -t rsa
+Generating public/private rsa key pair.
+Enter file in which to save the key (/Users/martinh/.ssh/id_rsa):
+Enter passphrase (empty for no passphrase):
+Enter same passphrase again:
+Your identification has been saved in /Users/martinh/.ssh/id_rsa.
+Your public key has been saved in /Users/martinh/.ssh/id_rsa.pub.
+The key fingerprint is:
+77:15:d9:55:4f:b9:01:90:2c:48:ae:3b:39:22:52:fa martinh@macbookpro.local
+The key's randomart image is:
++--[ RSA 2048]----+
+| ... ..o.ooB|
+| .. . o .=o|
+| . . . +|
+| . . . |
+| . . S . . |
+| o o . . |
+|o. . = |
+|... . o |
+| E |
++-----------------+
+martinh@macbookpro:~$
+
+
+Make sure you use a good passphrase. If you leave the passphrase empty, anyone +with access to your key file have access to any remote server you authorize with +that key.
+ +To authorize a remote server to log you in with this key, you copy the +public key to the ~/.ssh/authorized_keys file on the remote server:
+ +cat ~/.ssh/id_rsa.pub | ssh hostname 'mkdir -m700 -p .ssh && cat >> .ssh/authorized_keys'
+
+
+The above command makes sure the remote .ssh directory exists and has +the correct permissions, and appends your new public key to any existing +authorized keys.
+ +If you have multiple keys, or use non-standard filenames, you may have to tell +ssh what key to use. You can do this by adding a host directive in the ssh +configuration file, ~/.ssh/config:
+ +Host www.example.com
+ IdentityFile ~/.ssh/id_rsa.example.com
+
+
+
+
diff --git a/doc/help/symbols.html b/doc/help/symbols.html
new file mode 100644
index 00000000..a2ae1f41
--- /dev/null
+++ b/doc/help/symbols.html
@@ -0,0 +1,62 @@
+
+
+
+
+
+ The symbol list shows language-specific symbols extracted from the document. +You can navigate the symbol list by pressing the ⌘Y key.
+ +To jump to a symbol, select the symbol and press enter, s, +v or o to open it in a tab, a split view, a vertical +split, or replace the current document, respectively.
+ +Here is a list of all key mappings in the symbol list:
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
The symbol list shows language-specific symbols extracted from the document. +You can navigate the symbol list by pressing the ⌘Y key.
+ +To jump to a symbol, select the symbol and press enter, s, +v or o to open it in a tab, a split view, a vertical +split, or replace the current document, respectively.
+ +Here is a list of all key mappings in the symbol list:
+ +Vico includes a command line tool that can be used to launch vico from +the shell.
+ +To use the tool from the command line, create a link from the +application bundle to a directory in your PATH. If you have a +bin directory in your home directory, create it as:
+ +ln -s /Applications/Vico.app/Contents/MacOS/vicotool ~/bin/vico
+
+
+If you want to install it for all users on the machine, create the link +in a global directory (this requires administrator privileges):
+ +sudo ln -s /Applications/Vico.app/Contents/MacOS/vicotool /usr/local/bin/vico
+
+
+If Vico is not stored in your /Applications folder, adjust the command +appropriately. Once the link is created, it will be kept up-to-date +when Vico is updated.
+ +To open a file with Vico from the shell, simply type:
+ +vico filename
+
+
+You can open multiple files at once, also using globbing characters (eg, +vico *.py). If you specify a directory, Vico will display a +new window with the directory selected in the explorer sidebar.
+ +If you want to use Vico in your $EDITOR variable to edit +commit messages, you need to use the -w switch. This makes +Vico wait until the document is closed to return. The return code from +vicotool is 0 if the document saved successfully before closing, and +non-zero if it wasn't saved.
+ +To see a quick description of the command line usage, use the +-h option:
+ +$ vico -h
+syntax: vicotool [-hrw] [-e string] [-f file] [-p params] [file ...]
+options:
+ -h show this help
+ -e string evaluate the string as a Nu script
+ -f file read file and evaluate as a Nu script
+ -p params read script parameters as a JSON string
+ -p - read script parameters as JSON from standard input
+ -r enter runloop (don't exit script immediately)
+ -w wait for document to close
+
+
+
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
Vico includes a command line tool that can be used to launch vico from +the shell.
+ +To use the tool from the command line, create a link from the +application bundle to a directory in your PATH. If you have a +bin directory in your home directory, create it as:
+ +ln -s /Applications/Vico.app/Contents/MacOS/vicotool ~/bin/vico
+
+
+If you want to install it for all users on the machine, create the link +in a global directory (this requires administrator privileges):
+ +sudo ln -s /Applications/Vico.app/Contents/MacOS/vicotool /usr/local/bin/vico
+
+
+If Vico is not stored in your /Applications folder, adjust the command +appropriately. Once the link is created, it will be kept up-to-date +when Vico is updated.
+ +To open a file with Vico from the shell, simply type:
+ +vico filename
+
+
+You can open multiple files at once, also using globbing characters (eg, +vico *.py). If you specify a directory, Vico will display a +new window with the directory selected in the explorer sidebar.
+ +If you want to use Vico in your $EDITOR variable to edit +commit messages, you need to use the -w switch. This makes +Vico wait until the document is closed to return. The return code from +vicotool is 0 if the document saved successfully before closing, and +non-zero if it wasn't saved.
+ +To see a quick description of the command line usage, use the +-h option:
+ +$ vico -h
+syntax: vicotool [-hrw] [-e string] [-f file] [-p params] [file ...]
+options:
+ -h show this help
+ -e string evaluate the string as a Nu script
+ -f file read file and evaluate as a Nu script
+ -p params read script parameters as a JSON string
+ -p - read script parameters as JSON from standard input
+ -r enter runloop (don't exit script immediately)
+ -w wait for document to close
+
+ When you select text in Vico, you enter visual mode. This is similar to normal +mode in that keys act as commands. They do not replace the selected text (you +must use the change command for that).
+ +Commands that require a motion (operators) instead use the +selected text directly.
+ +You can select text by dragging with the mouse, or with the v and +V commands. The latter enters visual line mode, where only +whole lines are selected. The selection is extended by moving around with the +regular movement commands.
+ +You can toggle between visual line mode and character mode by pressing +v while in line mode, or V while in visual character mode.
+ +Press ⎋ (escape) to cancel the selection and go back to normal +mode.
+ +
+
+ home
+ blog
+ download
+ feedback
+ lists
+ help
+ api
+
When you select text in Vico, you enter visual mode. This is similar to normal +mode in that keys act as commands. They do not replace the selected text (you +must use the change command for that).
+ +Commands that require a motion (operators) instead use the +selected text directly.
+ +You can select text by dragging with the mouse, or with the v and +V commands. The latter enters visual line mode, where only +whole lines are selected. The selection is extended by moving around with the +regular movement commands.
+ +You can toggle between visual line mode and character mode by pressing +v while in line mode, or V while in visual character mode.
+ +Press ⎋ (escape) to cancel the selection and go back to normal +mode.
++ Vico is a programmers text editor with a strong focus on keyboard + control. Vico uses vi key bindings to let you keep your fingers on + the home row and work effectively with your text. +
+ ++ Vico comes with support for the most common languages, such as html, + php, ruby and javascript. And since Vico can use existing TextMate + bundles, it's easy to add more. +
+ ++ Vico also features integrated SFTP for working with remote files, split + views to let you edit files side-by-side and a file explorer for fast + project navigation. +
+ ++ Quickly navigate between files using fuzzy find, or open files directly + from the ex command line with tab completion. Jumping to symbols is easy + with the symbol list, or use ctags to find the definition under the + cursor. Ctags even works remotely over SFTP. +
+ ++ Vico is scriptable in the Nu language. +
+ + ++ Click images to see a larger version. +
+ +