diff --git a/README.md b/README.md index 58eaa53..174639d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Coming soon. ### Features vibreoffice currently supports: -- Insert (`i`, `I`, `a`, `A`), Visual (`v`), Normal modes +- Insert (`i`, `I`, `a`, `A`, `o`, `O`), Visual (`v`), Normal modes - Movement keys: `hjkl`, `w`, `W`, `b`, `B`, `e`, `$`, `^`, `{}`, `()`, `C-d`, `C-u` - Search movement: `f`, `F`, `t`, `T` - Number modifiers: e.g. `5w`, `4fa` diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 78038e3..61e9310 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -359,11 +359,31 @@ Function ProcessModeKey(oEvent) bMatched = True Select Case oEvent.KeyChar ' Insert modes - Case "i", "a", "I", "A": + Case "i", "a", "I", "A", "o", "O": If oEvent.KeyChar = "a" Then getCursor().goRight(1, False) If oEvent.KeyChar = "I" Then ProcessMovementKey("^") If oEvent.KeyChar = "A" Then ProcessMovementKey("$") + If oEvent.KeyChar = "o" Then + ProcessMovementKey("$") + ProcessMovementKey("l") + getCursor().setString(chr(13)) + If Not getCursor().isAtStartOfLine() Then + getCursor().setString(chr(13) & chr(13)) + ProcessMovementKey("l") + End If + End If + + If oEvent.KeyChar = "O" Then + ProcessMovementKey("^") + getCursor().setString(chr(13)) + If Not getCursor().isAtStartOfLine() Then + ProcessMovementKey("h") + getCursor().setString(chr(13)) + ProcessMovementKey("l") + End If + End If + gotoMode("INSERT") Case "v": gotoMode("VISUAL")