|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.raelity.jvi.Normal
public class Normal
Contains the main routine for processing characters in command mode. Communicates closely with the code in ops.c to handle the operators.
This class started with VIM's normal.c. The idea is to work this into something that can be used in a JEditorPane framework to implement vi. So things that are handled by swing text are taken out. Here is a partial list of changes.
Constructor Summary | |
---|---|
Normal()
|
Method Summary | |
---|---|
static void |
displaySelectState(String s)
|
static void |
normal_cmd(char c,
boolean toplevel)
normal Parse and execute a command in Normal mode. |
static void |
processInputChar(char c,
boolean toplevel)
Vi comands can have up to three chunks: buffer-operator-motion. |
static void |
resetCommand()
|
static void |
v_updateVisualState(ViTextView tv)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Normal()
Method Detail |
---|
public static void processInputChar(char c, boolean toplevel)
To fit in the swing environment, we want to be able to parse one character at a time in the event thread. This means we have to return after each character. So we must maintain a bunch of "where am i" state information between each character. This is messy, but not too bad. (Only breiefly considered having a separate thread.)
Operator and motion are very similar, they have
public static void resetCommand()
public static void normal_cmd(char c, boolean toplevel)
public static void displaySelectState(String s)
public static void v_updateVisualState(ViTextView tv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |