viAllOver v0.2b by Matt O'Brien - viallover at dabble.org http://dabble.org/viallover/ --- 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 includes a system preference pane for instalation/removal of the input manager and configuration. 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. any feedback would be greatly appreciated. Installation --- install the system preference pane, viAllOver.prefpane. once the system preference pane is installed click the "Install InputManager" button at the top of the pane. then restart your cocoa apps or you can restart your computer. if you have a previous version of the input manager installed and the button reads "Uninstall InputManager" click the button to uninstall the old version then click the button again to install the new input manager. * please note, the install/uninstall feature of the system preference pane does not work correctly when the preference pane is installed for all users. it is recommended that you install the system preference pane only for your user at this time. if you would like to be able to install the system preference pane for all users please let me know and i'll make it work. Uninstall --- click the "Uninstall InputManager" button to uninstall the input manager. the system preference pane is then uninstalled normally. 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 with the system preference pane. 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. the system preference pane allows you to install/uninstall the inputmanager and configure viAllOver. the grayed out settings for the bindings and excluded applications are the defaults. you can not remove the default excluded apps. when you modify or add bindings they will turn black, meaning that they are saved in your preference file. if you remove a default binding it will turn black and have no action, this allows you to disable a default binding. if you remove a custom binding that is also in the defaults, the default will be restored. Release 0.2b ------ 'esc' now clears anything you've entered but haven't finished. fixed move to first character, '^'. a bit too quick and dirty before. fixed join, 'J'. behaves much better now, sometimes it didn't work and could be a bit destructive before. fixed line pasting. pasting lines of text works much more vi-like. extremely handy. change case, '~'. works now. go to, 'G'. just 'G' goes to the end of the document and '12G' would go to the beginning of line 12. repeat last line find, ';' and ','. ';' will repeat the last line find and ',' will repeat the last line find in the opposite direction. added support for using some movement and find commands in scroll views. currently implemented commands are '/', 'N', '^b', '^d', '^e', '^f', '^u', '^y', 'h', 'j', 'k', 'l', and 'n'. this implementation interrupts typing to find in lists. this feature can be disabled in the system preference pane. changed the default color for visual mode. added a system preference pane for instalation/removal of the input manager and configuration. changed the format of the preference file, please use the system preference pane for configuration. added an option to start viAllOver in command mode. added SecurityAgent (com.apple.securityagent) to the default exclude list. this prevents viAllOver from loading for the login window and authorization dialogs. added an option to not modify the insertion point when in insert mode. this option currently doesn't work perfectly, the unmodified insertion point position is not updated correctly when switching between command and insert mode. added options to set the alpha for the insertion point and the selection. added an option to instantly disable viAllOver without uninstalling the inputmanager. when switcthing viAllOver on and/or off you may end up with two insertion points. fixed a bug where some machines wouldn't make a selection when multiple-clicking. 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. you don't need viAllOver in the terminal. add the following to you .bash_profile # vi editiong mode set -o vi Known Problems ------ causes some text views to not allow input. "Crash Submitter" for instance. that is why there is an exclude list. the preference pane can be used to add applications to the exclude list. some commands aren't implemented or aren't implemented correctly. please, please, please let me know if you find a problem or are missing your favorite commands. i don't use all of the vi commands, as i'm sure many of you don't either, so i might not notice a inaccurate implementation or missing command. 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:"; } *** the preference pane should be used for setting preference and adding/modifing bindings *** *** the following information is up to date as of release 0.2b. *** 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. this preference file also disables movement and find commands in scroll views. here is an example preference file, all of the following commands are implemented in the defaults, bindings command movement ^ moveToBeginningOfLine: vAO_wordForward: other commandColor blue 1.0 green 0.0 red 1.0 excludedApps com.apple.Console com.company.BrokenApp useMovementKeysInScrollViews -- 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