
viAllOver v0.1b
by Matt O'Brien - viallover at dabble.org
---
viAllOver is a subclass of NSTextView which makes all textviews in a cocoa application behave more like vi. it uses the InputManager mechanism to try and load its self in all cocoa applications. 

viAllOver is a universal binary that should run on 10.4 and 10.3.9.

viAllOver is currently in beta, it may have memory leaks, it could crash your apps. i haven't had any major problems, but use at your own risk, save often. i take no responsibility for any damages or problems, but if you let me know i'll try my best to fix them.


Installation
---
place the "viAllOver" folder into "~/Library/InputManagers/" or "/Library/InputManagers/" and restart your cocoa apps or you can restart your computer.


Uninstall
---
remove the "viAllOver" folder from "~/Library/InputManagers/" or "/Library/InputManagers/" and restart your cocoa apps or you can restart your computer.


Usage
---
well it pretty much works like vi. once viAllOver is loaded you should see a non-blinking green block insertion point, this is insert mode. the insertion point will turn red when in command mode, orange when in visual mode, and gray when inactive, you can customize these colors in your org.dabble.viAllOver.commands.plist file. the "esc" key should put you into command mode, "i", "a", "o", "O", "c", and "s" should return you to insert mode. using the mouse to make a selection while in command mode will turn on visual mode so you can use vi commands to modify the selection.


Release 0.1b
------
find, '/', 'n', 'N', '*', '#'. '/' calls up the find dialog. 'n' and 'N' find the next and previous, respectively. '*' and '#' operate on the selection if there is one, otherwise the word under the cursor is used.

undo,'u' and redo, 'R'. tied to "undo:" and "redo:".

join, 'J'. this is something i've wanted to do for a while. the implementation of join added the ability to insert text from the commands.plist, needed to insert a space. it also added the ability to put alias, like 'dw', in and array of selectors in the commands.plist.

visual mode, 'v' and visual line mode 'V'. visual mode uses the selection to do it's thing. when selecting with the mouse in command mode visual mode is automatically turned on. visual line mode can be a little flakey, if you can't move up or down a line try moving to the beginning or end of the line then trying to more up or down again. viAllOver also colors the selection so you know what mode you are in when selecting. visual mode currenty uses a combination of fixed-point and addition model selection, not very friendly, but works for simple selections.

line find, 'f', 'F', 't', and 'T'. very useful additions, 't' is one of my favorites. these don't stop at the end of the line, so they arn't really line finds.

fixed word movement, 'w', 'W', 'b', 'B', 'e', and 'E' work more like vi now.

repeat last edit, '.'. seems to be working pretty well.

the delete key now behaves more like vi, moving the insertion point to the left when in command mode.

custom color. the insertion point colors are specified in the commands.plist and users can override the colors in their org.dabble.viAllOver.commands.plist file. the colors are specified by their red, green, and blue components. the values can be from 0.0 to 1.0 anything over 1.0 is interpreted as 1.0. so if you specified red to be 0.25 that would be 25% red. to get values you can use Apple's DigitalColor Meter's "RGB As Percentage" setting to get values, just move the decimal over.

modes and such are remembered on a per field basis now rather then the per app as before.

fixed the insertion point drawing for newlines.

added the ability to assign key commands to vi commands. linking to key commands opens up many possibilities, like shift right and left, '>' -> 'command-]' and '<' -> 'command-['. granted these could probably be implemented more universally and more vim-like, but this was quick and easy and works where i use it. in the commands.plist '@' stands for 'command', '~' is 'option', '^' is 'control', and '$' is 'shift', just like key bindings dict.

universal binary that should run on 10.4 and 10.3.9.

preference files have been combined into one file now, org.dabble.viAllOver.plist. see the "extra files" section.


Notes
------
"x", "d", "y", and "p" are tied to the cut and paste buffer.

you can use "option-esc" for completions in xcode. or "control-n" if you install the key binding dict in the "extra files" section.


Known Problems
------
causes some text views to not allow input. "Crash Submitter" for instance. that is why there is an exclude list, see "extra files" section. only a problem if the app doesn't have an unique identifier and can't be added to the exclude list.

some commands aren't implemented or aren't implemented correctly. 

does not work with the message body in mail on 10.4. apple is using a WebView for the message body and it looks like it does editing a bit differently.


Extra Files
-----

the following can be added to the custom key binding dict, ~/Library/KeyBindings/DefaultKeyBinding.dict

{
    /* Additional vi bindings */
    "^f" = "pageDown:";
    "^b" = "pageUp:";
    "^e" = "scrollLineUp:";
    "^y" = "scrollLineDown:";
   
    /* some vim bindings */
    "^n" = "complete:"; 
}


users can have a file in their preferences folder named, org.dabble.viAllOver.plist, which overwrites any defaults. you can use this to add commands or change the way the commands work. this can be very useful for testing new commands.

if you are having problems with an application, usualy not allowing you to insert text, you can have viAllOver not load for that app. you can get the applications bundle identifier from the console.log in the "Console" application. viAllOver outputs the bundle identifier to the console.log when the application starts up. then add the bundle identifier to the "exclude" array in you preference file.

you can also specify the colors for the insertion point and selections in the preference file. the example below makes the insertion point purple in command mode.

here is an example preference file, all of the following commands are implemented in the defaults,

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>bindings</key>
	<dict>
		<key>command</key>
		<dict>
		</dict>
		<key>movement</key>
		<dict>
			<key>^</key>
			<array>
				<string>moveToBeginningOfLine:</string>
				<string>vAO_wordForward:</string>
			</array>
		</dict>
		<key>other</key>
		<dict>
		</dict>
	</dict>
	<key>color</key>
	<dict>
		<key>command</key>
		<dict>
			<key>blue</key>
			<real>1.0</real>
			<key>green</key>
			<real>0.0</real>
			<key>red</key>
			<real>1.0</real>
		</dict>
	</dict>
	<key>exclude</key>
	<array>
		<string>com.apple.Console</string>
		<string>com.company.BrokenApp</string>
	</array>
</dict>
</plist>


--

Copyright 2005-2007 Matt O'Brien

 This file is part of viAllOver.
 
 viAllOver is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.
 
 viAllOver is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with viAllOver; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

