This commit is contained in:
Sean Yeh 2014-12-20 21:03:38 -06:00
parent 5d6cf029e7
commit 7d2c590cc9
2 changed files with 22 additions and 2 deletions

View File

@ -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`

View File

@ -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")