I've always wanted to use JB's integrated editor so i could take advantage of code insight, fixing compiler errors quickly and access to other IDE features. Now i can work on text within JB and keep my hands on the keyboard. If you haven't tried it, compiling or the find-in-path command, along with Shft-Ctrl-N and Shft-Ctrl-P are real handy.
The version of jVi used by JBuilder is displayed on the "Vi..." editor option property page. Please include both the jVi version number and the JBuilder version number when reporting problems.
The class that defines the IDE keybindings is included in the jar file and can be modified by the user. Any keystrokes defined in this keymap are removed from the keymap used by VI, so take care not to define any keystrokes that you want vi to see. Function keys and double modifiers are safe.
Feedback welcome, particulary about:
:' and then bring up a dialog. Comments?
Text search commands, for example "/" and "?",
depend on third party libraries for regular expression matching.
Either
OROMatcher version 1.1 or
com.stevesoft.pat
version 1.4
or
gnu.regexp
version 1.0.8
can be used. It is your responsibility to get the
package of your choice.
If you obtain a license for the shareware com.stevesoft.pat
then you can set the
JVM property "com.stevesoft.pat.Key" to your license key.
Make sure the regular expression package is in the
application's classpath.
If you do not get a regular expression package, as described under Quick Start, then the JBuilder version of jVi defaults to using JB's internal search engine.
There are options for controlling metacharacter escaping. These are set through the "Vi..." property tab. Also, the regular expression package in use is displayed here. Check Searching and Patterns for information on searching and a description of the options.
Since there is not yet a ':set [no]ic' command, this is
controlled by the setting of the JBuilder flag for case sensitive
searching. Use something like 'C-S-F' to bring up JB's
find dialog and then set the flag.
'%' argument is present only the active node is made.:make command, but
it invokes JB's rebuild.The IDE keybindings are derived from the CUA keybindings. Some keybindings may not be what you expect. The following table has some keybindings that are either changed from the standard vi keybindings or are changed from the CUA keybindings.
| Ctrl-J | JB's Code Templates. (cursor down in standard vi) |
| Ctrl-Shft-F | moved: Bring up JB's find dialog. (was Ctrl-F) |
| Ctrl-Shft-R | moved: Bring up JB's replace dialog. (was Ctrl-R) |
| Ctrl-G | Removed: JB's goto line dialog. |
JB options are used where applicable
jVi, when running under JBuilder, now has an option to work around this jdk1.3 issue. The problem is that if JEditorPane.isEditable() is false, then KEY_TYPED events are not delivered to the application. Stuff like '^D' still gets through, but normal asci does not.
The fix involves changing 'isEditable()' while the window is the currently active editor. This behavior, which defaults on, can be turned off with this option in the 'Editor' tab of the 'EditorOptions' dialog.
You can add ":" commands as well as keybindings. Here is an example for adding ":" commands. Refer to ColonCommands API for more info.
import com.borland.primetime.ide.Browser;
import com.raelity.tools.vi.ColonCommands;
class MyStuff {
public static void initOpenTool(byte majorVersion, byte minorVersion) {
ViManager.addStartupListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
initStuff();
}});
}
private void initStuff() {
ColonCommands.register("com", "command", Browser.ACTION_NavigateBack);
}
}