From 4586b8eabc0871c5d80445f0d8b16be987471604 Mon Sep 17 00:00:00 2001 From: masasibe Date: Thu, 27 Aug 2015 00:52:55 +0200 Subject: [PATCH 01/27] Update vibreoffice.vbs --- src/vibreoffice.vbs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 1d6e8c5..be24cec 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -376,8 +376,9 @@ Function ProcessGlobalKey(oEvent) bMatched = True bIsControl = (oEvent.Modifiers = 2) or (oEvent.Modifiers = 8) - ' PRESSED ESCAPE (or ctrl+[) - if oEvent.KeyCode = 1281 Or (oEvent.KeyCode = 1315 And bIsControl) Then + ' keycode can be viewed here: http://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1awt_1_1Key.html + ' PRESSED ESCAPE (or ctrl+[) (or ctrl+C) + if oEvent.KeyCode = 1281 Or (oEvent.KeyCode = 1315 And bIsControl) Or (oEvent.KeyCode = 514 And bIsControl) Then ' Move cursor back if was in INSERT (but stay on same line) If MODE <> "NORMAL" And Not getCursor().isAtStartOfLine() Then getCursor().goLeft(1, False) From ea2a8c494614bb90c635d99e3db4eae1734114b9 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 27 Aug 2015 09:53:16 +0200 Subject: [PATCH 02/27] G for endOfText 0 for startOfLine Strg+C for going to NormalMode --- src/vibreoffice.vbs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index be24cec..b119ab4 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -299,14 +299,15 @@ function KeyHandler_KeyPressed(oEvent) as boolean iLen = Len(getCursor().getString()) getCursor().setString(genString(oEvent.KeyChar, iLen)) + ' Normal Key (must be before MultiplierKey, so that 0 is seen as startOfLine) + ElseIf ProcessNormalKey(oEvent.KeyChar, oEvent.Modifiers) Then + ' Multiplier Key ElseIf ProcessNumberKey(oEvent) Then bIsMultiplier = True delaySpecialReset() - ' Normal Key - ElseIf ProcessNormalKey(oEvent.KeyChar, oEvent.Modifiers) Then - ' Pass + ' Pass ' If is modified but doesn't match a normal command, allow input ' (Useful for built-in shortcuts like Ctrl+a, Ctrl+s, Ctrl+w) @@ -412,6 +413,8 @@ Function ProcessStandardMovementKey(oEvent) ProcessMovementKey("l", True) ElseIf c = 1028 Then ProcessMovementKey("^", True) + ElseIf c = "0" Then + ProcessMovementKey("0", True) ' key for zero (0) ElseIf c = 1029 Then ProcessMovementKey("$", True) Else @@ -935,7 +938,7 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) bSetCursor = False ' ---------- - ElseIf keyChar = "^" Then + ElseIf keyChar = "0" Then getCursor().gotoStartOfLine(bExpand) bSetCursor = False ElseIf keyChar = "$" Then @@ -954,6 +957,8 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' maybe eventually cursorGoto... should return True/False for bsetCursor bSetCursor = False + ElseIf keyChar = "G" Then + oTextCursor.gotoEnd(bExpand) ElseIf keyChar = "w" or keyChar = "W" Then oTextCursor.gotoNextWord(bExpand) ElseIf keyChar = "b" or keyChar = "B" Then From 2b3468a8aae6ef114f785173c82f5b13ea7e2860 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 27 Aug 2015 10:28:59 +0200 Subject: [PATCH 03/27] With gg for going to beginning of text --- src/vibreoffice.vbs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index b119ab4..1521f6f 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -667,6 +667,21 @@ Function ProcessSpecialKey(keyChar) ElseIf keyChar = "r" Then setSpecial("r") + ' gg to go to beginning of text + ElseIf keyChar = "g" Then + If bIsSpecial Then + if getSpecial() = "g" Then + dim bExpand + bExpand = false + oTextCursor = getTextCursor() + oTextCursor.gotoStart(bExpand) + getCursor().gotoRange(oTextCursor.getStart(), False) + End If + ElseIf MODE = "NORMAL" Or MODE = "VISUAL" Then + setSpecial("g") + End If + + ' Otherwise, ignore if bIsSpecial ElseIf bIsSpecial Then bMatched = False From 266f5bbc0e49e755bc0b3d8b914ff2b15b465952 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 27 Aug 2015 12:46:24 +0200 Subject: [PATCH 04/27] Version 1.0.20 released --- dist/vibreoffice-1.0.20.oxt | Bin 0 -> 11849 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 dist/vibreoffice-1.0.20.oxt diff --git a/dist/vibreoffice-1.0.20.oxt b/dist/vibreoffice-1.0.20.oxt new file mode 100644 index 0000000000000000000000000000000000000000..c0d7fc0b6d1e24333d810ceb3bd7f041f490ab32 GIT binary patch literal 11849 zcmbW7byQqy(ytp20Ro|McXtTx?h@P*+$~6>!QI`02G`*3?$8h{xVs0p%bB^~I?3EK z=bO2^*WTUz$NTJBRlm2Y)_O}(1`7H$;Ezkn7+2ySKmP9n5r78(nH$&}+nSh|8yYjJ zs=x!FLiUzb|G1r85C9O+yHEhYKOTxN6ttIhul_*^Scb#7!Uq7@{Qv;mf1&(BWNsjK53?u|(dEs+kiItFlc)y`p%x&x@z2V#jjpL;%m z1=?62P^FaWVq4ql`fRL1Htjf9SaW~YBQt(U=AEL8n%ulQtn&IKZibqxA75HNPOwvd z;>mx1`mMn0zTnHC-P4x7=s8hXUGFpn(r|KYP=A#3a&%fNk3goCIg2Jkj`!7+m6N9@ zYdi779R<=5lH6;^iScoX4OaWUpzCfDUZ_q^QhlMj#U-m#QEZsl@(V-~AC=@V8yZJKOzty!amnG19rybl{D91OpMzZITU z8;47^{)*=+^fj&2TpZKAYUm+1OFxQ^Ra&ZvtnhVcB-uRw`Q0}M1X=9utf{Mw;Nto*wVBFh#u))0430 zMIQ$r%iV@Pck1YX5skk4HL~;atJIdW)8n%~+-GV2uG2H<_ zjwLo+2`PfyjecS?3>;3a9=|b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2rYjD42ISWbuH|tX;jIr%<_*qJY639if%jt*TW2f{PxbwV*uks7KFt_uC=I52cwZ= zHVUoJ@eVc==e;MV7i2&hqY@f@KkF_lo~(7JhsEwTVqU$Pkd5415~O_C-Z+B5r}(Qa zjr&1?^47!^&H)-kmK;3GE%or?{ID@hm9FnJP(DZy7Ew#Injsq!0E&|(xSjLnY<-yw zbqfi#oC|syCxDeA%_6l{8teQt=R8-)w*r#3l+YUx&3bcDu=+Dmr0es2uZIUVc{Sr7 z>E^FB1^*I5IWZL>dMSDF|3U`Qp~(EuFEY@81OU)~MOf?Gn41_oyp-*~FHU7Kl{Vc( zD1q0!FvdX++^R9@R1wP5@3l=Uf+C?SB18fDR=u_#_lM;2BvZPeo!i^)<#WFbYvu^u z$!o@~k;^f~25M)^#;p~5kTSYdf5=sEt)y*_baylnpRPhEx%G{lKDgHpVuGMbV-wS* zWhlBt68x~eYd9vx-thz^W2N{;$5H8#AoD-e(bP=75hL;%){6@OePfFq$lzJE_T zF#jCC{C`F-{~-REa(*Aa{3r26dVpLX@qZ!yLjUI|=708r-&^uuUl2p^yUD*c=>Hk} z_XhV@b|&HP>|fj6|BU^6Z}=;_gXpED{!>5y+>HMj^!HxmS7;sy;P=kt?|^?T2$i8ejKT6|&Pec2S21)*Z4SS*eqN$f%_;=(#75jUU{MCnw|Azc) z$^5%_{Iy%*f3qHq67XwE|2y2DCjXw$e>GYCSKROE{qN9!Z7I@kmKIY1{x!}09r90W ke@}A1T6^}d$lp`mzr(}8zN8Yso0m_|OJie8{l~xm1K54BumAu6 literal 0 HcmV?d00001 From ffb71f00c79ce6f66b123c9cea920f09555e463b Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 27 Aug 2015 13:54:04 +0200 Subject: [PATCH 05/27] little Bugfix for I (insert at beginning of line) --- dist/vibreoffice-1.0.20.oxt | Bin 11849 -> 11853 bytes src/vibreoffice.vbs | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/vibreoffice-1.0.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K^JQu1fE(s~$(>j(vfl>Z?p4+=m7`O6;>+;Su z0nrBxJppmR=j(+dXPFurTGulbjYkE^oT=`yehCG~9r zdn>%|N};0#6k4L??QM9xgOQMWfTtK$7uf$8z7qOnjIn;xzoPzR<(Q+ke)T#fWI4JV?=0()hPP0h3T6G-feiNImrfTjvZTI8 zc>;4x^>PNC@p}@1h=wSd0N{2LEzqB+JiVTw%!wjl z*2hTc>bH~tz+jdW8>cQ9{@hyUS5qMojX;r%Oq&4&7rS2TNOptnIE`5-*Mjinn=7vA0aM0R(-kfN> H%+vn>XS*xM diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 1521f6f..95aa677 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -953,7 +953,7 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) bSetCursor = False ' ---------- - ElseIf keyChar = "0" Then + ElseIf keyChar = "0" or keyChar = "^" Then getCursor().gotoStartOfLine(bExpand) bSetCursor = False ElseIf keyChar = "$" Then From 00923cff63d778b01386c321c04655013454142c Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Wed, 11 Nov 2015 01:33:31 -0800 Subject: [PATCH 06/27] Fixes e (end of word) "e" will now work how it does in vim. Pressing "e" moves the cursor to the end of the current word. If already at the end of the word then it moves the cursor to the end of the next word. --- src/vibreoffice.vbs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 95aa677..fd3f637 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -972,13 +972,16 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' maybe eventually cursorGoto... should return True/False for bsetCursor bSetCursor = False - ElseIf keyChar = "G" Then - oTextCursor.gotoEnd(bExpand) + ElseIf keyChar = "G" Then + oTextCursor.gotoEnd(bExpand) ElseIf keyChar = "w" or keyChar = "W" Then oTextCursor.gotoNextWord(bExpand) ElseIf keyChar = "b" or keyChar = "B" Then oTextCursor.gotoPreviousWord(bExpand) ElseIf keyChar = "e" Then + If oTextCursor.isEndOfWord(bExpand) Then + oTextCursor.gotoNextWord(bExpand) + End If oTextCursor.gotoEndOfWord(bExpand) ElseIf keyChar = ")" Then From f1b5c427702144ad576e374ebd4df898b0b33242 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Wed, 11 Nov 2015 20:36:55 -0800 Subject: [PATCH 07/27] Another fix for e (end of word) "e" can now go to the next line when there are only whitespace characters on the current line. Before this the cursor would get stuck, not moving no matter how many times you press "e" when the current line only had whitespace characters. --- src/vibreoffice.vbs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index fd3f637..09ca03d 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -413,8 +413,8 @@ Function ProcessStandardMovementKey(oEvent) ProcessMovementKey("l", True) ElseIf c = 1028 Then ProcessMovementKey("^", True) - ElseIf c = "0" Then - ProcessMovementKey("0", True) ' key for zero (0) + ElseIf c = "0" Then + ProcessMovementKey("0", True) ' key for zero (0) ElseIf c = 1029 Then ProcessMovementKey("$", True) Else @@ -984,6 +984,13 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) End If oTextCursor.gotoEndOfWord(bExpand) + ' This is needed in case the current line has no words. + ' This way it will go to the next line (if it exists). + If NOT oTextCursor.isEndofWord(bExpand) Then + oTextCursor.gotoNextWord(bExpand) + oTextCursor.gotoEndofWord(bExpand) + End If + ElseIf keyChar = ")" Then oTextCursor.gotoNextSentence(bExpand) ElseIf keyChar = "(" Then From 430b759dd68a63c5cea2c28c7832aa3df612596e Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Thu, 12 Nov 2015 01:52:09 -0800 Subject: [PATCH 08/27] Fixes b/B (back word) This allows "b" to move the cursor back a word even when the line starts with whitespace. Before this "b" would get stuck on whitespace if it was at the beginning of the line. --- src/vibreoffice.vbs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 09ca03d..9031570 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -977,14 +977,36 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ElseIf keyChar = "w" or keyChar = "W" Then oTextCursor.gotoNextWord(bExpand) ElseIf keyChar = "b" or keyChar = "B" Then + dim olderPos, newerPos + olderPos = getCursor().getPosition() oTextCursor.gotoPreviousWord(bExpand) + ' Set global cursor to oTextCursor's position + getCursor().gotoRange(oTextCursor.getStart(), False) + newerPos = getCursor().getPosition() + + ' If the above changes didn't move the cursor then the current + ' line starts with whitespace or its on the first line. + ' If the former is true then move the cursor to the end of the above + ' line and then back one word. + If olderPos.X() = newerPos.X() And olderPos.Y() = newerPos.Y() Then + getCursor().goUp(1, bExpand) + newerPos = getCursor().getPosition() + If olderPos.Y() <> newerPos.Y() Then + getCursor().gotoEndOfLine(bExpand) + ' Apply change above to oTextCursor + oTextCursor = getTextCursor() + oTextCursor.gotoPreviousWord(bExpand) + End If + End If + + ElseIf keyChar = "e" Then If oTextCursor.isEndOfWord(bExpand) Then oTextCursor.gotoNextWord(bExpand) End If oTextCursor.gotoEndOfWord(bExpand) - ' This is needed in case the current line has no words. + ' This is needed in case the current line starts with whitespace. ' This way it will go to the next line (if it exists). If NOT oTextCursor.isEndofWord(bExpand) Then oTextCursor.gotoNextWord(bExpand) From fd17e1d74e156c8c2e9cbb6ba6b9b3975e699c85 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Thu, 12 Nov 2015 20:08:38 -0800 Subject: [PATCH 09/27] Another fix for b/B (back word) Before this "b" would skip the cursor over the line above it if the line was empty. It also used to skip over the previous word if that word was 1 character and was on the line above the cursor. --- src/vibreoffice.vbs | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 9031570..ec9d153 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -980,26 +980,36 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) dim olderPos, newerPos olderPos = getCursor().getPosition() oTextCursor.gotoPreviousWord(bExpand) - ' Set global cursor to oTextCursor's position + ' Set global cursor to oTextCursor's position getCursor().gotoRange(oTextCursor.getStart(), False) newerPos = getCursor().getPosition() - ' If the above changes didn't move the cursor then the current - ' line starts with whitespace or its on the first line. - ' If the former is true then move the cursor to the end of the above - ' line and then back one word. + ' If the above changes didn't move the cursor then the current + ' line starts with whitespace or its on the first line. + ' If the former is true then move the cursor to the end of the above + ' line and then back one word if it is not already on a word and the + ' line is not empty. If olderPos.X() = newerPos.X() And olderPos.Y() = newerPos.Y() Then getCursor().goUp(1, bExpand) newerPos = getCursor().getPosition() + ' If the cursor did go up a line If olderPos.Y() <> newerPos.Y() Then - getCursor().gotoEndOfLine(bExpand) - ' Apply change above to oTextCursor - oTextCursor = getTextCursor() - oTextCursor.gotoPreviousWord(bExpand) + ' If the line is not empty + If NOT (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) Then + getCursor().gotoEndOfLine(bExpand) + ' Apply change above to oTextCursor + oTextCursor = getTextCursor() + ' If the cursor is not already on the start of a word + ' then go back one word + If NOT oTextCursor.isStartOfWord() Then + oTextCursor.gotoPreviousWord(bExpand) + End If + Else + bSetCursor = False + End If End If End If - ElseIf keyChar = "e" Then If oTextCursor.isEndOfWord(bExpand) Then oTextCursor.gotoNextWord(bExpand) From 7222b4d35037af70e078d2a127642b9a499c1aab Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Fri, 20 Nov 2015 16:24:13 -0800 Subject: [PATCH 10/27] Makes back word more efficient. The process of using back word now has fewer lines of code and better documentation. --- src/vibreoffice.vbs | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index ec9d153..69b6036 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -977,29 +977,18 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ElseIf keyChar = "w" or keyChar = "W" Then oTextCursor.gotoNextWord(bExpand) ElseIf keyChar = "b" or keyChar = "B" Then - dim olderPos, newerPos - olderPos = getCursor().getPosition() - oTextCursor.gotoPreviousWord(bExpand) - ' Set global cursor to oTextCursor's position - getCursor().gotoRange(oTextCursor.getStart(), False) - newerPos = getCursor().getPosition() - - ' If the above changes didn't move the cursor then the current - ' line starts with whitespace or its on the first line. - ' If the former is true then move the cursor to the end of the above - ' line and then back one word if it is not already on a word and the - ' line is not empty. - If olderPos.X() = newerPos.X() And olderPos.Y() = newerPos.Y() Then - getCursor().goUp(1, bExpand) - newerPos = getCursor().getPosition() - ' If the cursor did go up a line - If olderPos.Y() <> newerPos.Y() Then + ' If the oTextCursor.gotoPreviousWord didn't move the cursor then the + ' current line starts with whitespace or it is the first word on the + ' first line. If the former is true then move the cursor to the end of + ' the above line. If the above line is not empty and the cursor is not + ' already on the start of a word then go to the previous word. + If NOT oTextCursor.gotoPreviousWord(bExpand) And getCursor().goUp(1, bExpand) Then ' If the line is not empty If NOT (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) Then getCursor().gotoEndOfLine(bExpand) - ' Apply change above to oTextCursor + ' Apply changes above to oTextCursor oTextCursor = getTextCursor() - ' If the cursor is not already on the start of a word + ' If the cursor is not already on the start of a word ' then go back one word If NOT oTextCursor.isStartOfWord() Then oTextCursor.gotoPreviousWord(bExpand) @@ -1007,7 +996,6 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) Else bSetCursor = False End If - End If End If ElseIf keyChar = "e" Then From 1a929ebbce884b31c0a294d29e41c5dedf36562f Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Sat, 21 Nov 2015 01:07:36 -0800 Subject: [PATCH 11/27] Far simpler implementation of back word. This fixes many problems that back word was having when using the gotoPreviousWord function. Back word will now not get stuck when the current line starts with whitespace. It will also now not skip over some of the words that start on the beginning of the line. It will stop going back when it hits an empty line like in vim. It will also skip over lines that only have whitespace (just like vim). --- src/vibreoffice.vbs | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 69b6036..1fe01c3 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -977,26 +977,25 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ElseIf keyChar = "w" or keyChar = "W" Then oTextCursor.gotoNextWord(bExpand) ElseIf keyChar = "b" or keyChar = "B" Then - ' If the oTextCursor.gotoPreviousWord didn't move the cursor then the - ' current line starts with whitespace or it is the first word on the - ' first line. If the former is true then move the cursor to the end of - ' the above line. If the above line is not empty and the cursor is not - ' already on the start of a word then go to the previous word. - If NOT oTextCursor.gotoPreviousWord(bExpand) And getCursor().goUp(1, bExpand) Then - ' If the line is not empty - If NOT (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) Then - getCursor().gotoEndOfLine(bExpand) - ' Apply changes above to oTextCursor - oTextCursor = getTextCursor() - ' If the cursor is not already on the start of a word - ' then go back one word - If NOT oTextCursor.isStartOfWord() Then - oTextCursor.gotoPreviousWord(bExpand) - End If - Else - bSetCursor = False - End If - End If + ' The function gotoPreviousWord causes a lot of problems. The + ' following method doesn't have to account for as many special cases. + + ' Move cursor to left in case cursor is already at the start of a word + ' or is already on an empty line. + oTextCursor.goLeft(1, bExpand) + getCursor().goLeft(1, bExpand) + + ' Move cursor left to the start of previous word or until it hits an + ' empty line or until it can't move left anymore (reaches first line). + ' gotoStartOfWord gets stuck sometimes so manually moving the cursor + ' left is necessary in these cases. + Do Until oTextCursor.gotoStartOfWord(bExpand) Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) + ' If cursor can no longer move left then break loop + If NOT oTextCursor.goLeft(1, bExpand) Then + Exit Do + End If + getCursor().goLeft(1, bExpand) + Loop ElseIf keyChar = "e" Then If oTextCursor.isEndOfWord(bExpand) Then From 47a2d62b66ef0ccfa348bdc9029233a39340bfc3 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Sat, 21 Nov 2015 02:25:10 -0800 Subject: [PATCH 12/27] Solves problems with next word. Next-word (w) will now reach the next word when it involves moving the cursor down a line and that line starts with whitespace. It will now also skip over lines that only contain whitespace (like vim). --- src/vibreoffice.vbs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 1fe01c3..4dd6247 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -975,7 +975,23 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ElseIf keyChar = "G" Then oTextCursor.gotoEnd(bExpand) ElseIf keyChar = "w" or keyChar = "W" Then + ' Using soley gotoNextWord would mean that the cursor would not be + ' moved to the next word when it involved moving down a line and + ' that line happened to begin with whitespace. It would also mean that + ' the cursor would not skip over lines that only contain whitespace. + oTextCursor.gotoNextWord(bExpand) + getCursor().gotoRange(oTextCursor.getStart(), False) + ' Stop looping when the cursor reaches the start of a word, an empty + ' line, or cannot be moved further (reaches end of file). + Do Until oTextCursor.isStartOfWord() Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) + ' gotoNextWord returns false when it cannot further advance the + ' cursor. + If NOT oTextCursor.gotoNextWord(bExpand) Then + Exit Do + End If + getCursor().gotoRange(oTextCursor.getStart(), False) + Loop ElseIf keyChar = "b" or keyChar = "B" Then ' The function gotoPreviousWord causes a lot of problems. The ' following method doesn't have to account for as many special cases. @@ -996,7 +1012,6 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) End If getCursor().goLeft(1, bExpand) Loop - ElseIf keyChar = "e" Then If oTextCursor.isEndOfWord(bExpand) Then oTextCursor.gotoNextWord(bExpand) From 6d44534315b4fa1c67e7b390994746c8cafff5d7 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Sat, 21 Nov 2015 02:43:28 -0800 Subject: [PATCH 13/27] Version 1.0.28 Release. Fixes/improvements for: -"w" next word -"b" back word -"e" end word --- README.md | 2 +- dist/vibreoffice-1.0.28.oxt | Bin 0 -> 12473 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 dist/vibreoffice-1.0.28.oxt diff --git a/README.md b/README.md index ec9f3e6..c19dac4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ both vi/vim neophytes and experts alike. ### Installation/Usage The easiest way to install is to download the -[latest extension file](https://raw.github.com/seanyeh/vibreoffice/master/dist/vibreoffice-0.1.4.oxt) +[latest extension file](https://raw.github.com/linuxmage/vibreoffice/master/dist/vibreoffice-1.0.28.oxt) and open it with LibreOffice/OpenOffice. To enable/disable vibreoffice, simply select Tools -> Add-Ons -> vibreoffice. diff --git a/dist/vibreoffice-1.0.28.oxt b/dist/vibreoffice-1.0.28.oxt new file mode 100644 index 0000000000000000000000000000000000000000..ff36d295c123990bd1f9dcc691dade3aa4c6623c GIT binary patch literal 12473 zcmbW8Wn3Iv*6tf}(zBRaIaC z5aN;wYJcp`Zg2oF-~j{x@aI9{CkE~3jWB;=eElElsDJ*W`?+KNBgXg-CasAros*l> zUm@W}R4&HkB~|UqDI~|J$44iWB}V9#E{0^Nq<+XtkI2Z)-O@{p1u!%<0{$5NpFafr z&(U2h3>{4DOie9}O#X{!7^I%mZT}fR2^au?{tpym3j=FAGdeeG!@qg}-6(0eZU&^! z=PzN6t}S!%A$9uNf=I`?_&oilrGaePad!{5P-Smx z+Pj*LbLqZDuAzlFc!k(Qb9>>RubjRqC+6T@7(-fOzi2Q(2_m||x}%w?E`X`{Fh%`X z2QS&zeAy|*b~A90U&qc?!hBNfl)nzE1E2N#jCQ6$0j7Rt!}y9JG zeu26%Q$hg1IsyQ|`3JfDB0xGfLxaE4%q-8d-AF4D z&_qw~KAcqhd=xWB$u~$StC+yw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;nk=hM(?P!0L z%TFKC%oBW&(~RFDm1T$v($1BM-zxDUp?9nKkT36EMconQ>0~N4R}EKs?;kaH{Adu& z07j9)BC1PG_w@&Yzz5KQ(YPpE=L;$cPjWE~xcD6{vsCKYdFmD$umSvAtX<{P{(H@C z+%Uq=lZmR-w4p3r(XSZ=3K5^DhTxg^Yqx27+YA`|UD|SW^|R`gxFfvvFLge)&G%MK ziltHlqSIUrGq*)b^X<=+{^`>EoAdMEC9^!8)XRWJHL;$0e!7vpH3R zZ_-yIa9W<$S7#QkzGsUJ##)6YozT(+ZKtT1mvi z`-EI50_K1K!^Aw;5(SodqB&2QML`?9ECj4U$2sS9X;?@q(+S??hF)kqXN7Q&WI?kg z8a#AZ&$c-ou}yOk4k#!to7;dO-OqbQCd26txgh4i_S@yjjlzjA_2FWwxu=TfrVvad zAB*X*EF%=8H+UcQc>SCeG`V1cvG!)=X*wDQny%{P-7lp}m?o zw(4rocrtOW9{2t5E={DL;*B9F;8|=Nn9cZxmRi1e#Ll}(kVH~h<#3{4bQFt&1GQA| z>2K{VV)Gj~M>9i2Huxe=j3{ zMf`ifzdL(>4H)ic+`kfk_4)p1?B9K|zp}A@u2sLXe|63NXYAiCroXbee!jH7vVXb$ zo8k078{qdw@Yex;kN|#f3;zoE&*u*Ex4D}l1^jO>^53IienTOV{SWHTzU05Bq5Vcv z`i1sO8h;k2zasx#T)%fHzveLKUyy(8SN>{@f1Xy@-=a6B0Q_1{{|fi_kbkeHzlL1& xEAIE&`k$eHuPVQyA1HsC$^ZU!!QX1kzk)(S{e0B{h(CY5KO4V|KRzu0{2#ERq_zM6 literal 0 HcmV?d00001 From 3f3e0974127bb9deb07820ee030945a48f3a1ba1 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Sun, 22 Nov 2015 00:47:54 -0800 Subject: [PATCH 14/27] End-word additonal fixes. End-word (e) will now behave more like it does in vim. --- src/vibreoffice.vbs | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 4dd6247..ec4776d 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -978,23 +978,24 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' Using soley gotoNextWord would mean that the cursor would not be ' moved to the next word when it involved moving down a line and ' that line happened to begin with whitespace. It would also mean that - ' the cursor would not skip over lines that only contain whitespace. + ' the cursor would not skip over lines that only contain whitespace. oTextCursor.gotoNextWord(bExpand) getCursor().gotoRange(oTextCursor.getStart(), False) - ' Stop looping when the cursor reaches the start of a word, an empty - ' line, or cannot be moved further (reaches end of file). + ' Stop looping when the cursor reaches the start of a word, an empty + ' line, or cannot be moved further (reaches end of file). Do Until oTextCursor.isStartOfWord() Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) ' gotoNextWord returns false when it cannot further advance the - ' cursor. + ' cursor. If NOT oTextCursor.gotoNextWord(bExpand) Then Exit Do End If getCursor().gotoRange(oTextCursor.getStart(), False) Loop ElseIf keyChar = "b" or keyChar = "B" Then - ' The function gotoPreviousWord causes a lot of problems. The - ' following method doesn't have to account for as many special cases. + ' The function gotoPreviousWord causes a lot of problems when trying + ' to emulate vim behavior. The following method doesn't have to + ' account for as many special cases. ' Move cursor to left in case cursor is already at the start of a word ' or is already on an empty line. @@ -1013,17 +1014,26 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) getCursor().goLeft(1, bExpand) Loop ElseIf keyChar = "e" Then - If oTextCursor.isEndOfWord(bExpand) Then - oTextCursor.gotoNextWord(bExpand) - End If - oTextCursor.gotoEndOfWord(bExpand) + ' The function gotoNextWord causes a lot of problems when trying to + ' emulate vim behavior. The following method doesn't have to account + ' for as many special cases. - ' This is needed in case the current line starts with whitespace. - ' This way it will go to the next line (if it exists). - If NOT oTextCursor.isEndofWord(bExpand) Then - oTextCursor.gotoNextWord(bExpand) - oTextCursor.gotoEndofWord(bExpand) - End If + ' Move cursor to right in case cursor is already at the end of a word + ' or is already on an empty line. + oTextCursor.goRight(1, bExpand) + getCursor().goRight(1, bExpand) + + ' Move cursor right to the end of next word or until it hits an empty + ' line or until it can't move right anymore (reaches first line). + ' gotoEndOfWord gets stuck sometimes so manually moving the cursor + ' right is necessary in these cases. + Do Until oTextCursor.gotoEndOfWord(bExpand) Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) + ' If cursor can no longer move right then break loop + If NOT oTextCursor.goRight(1, bExpand) Then + Exit Do + End If + getCursor().goRight(1, bExpand) + Loop ElseIf keyChar = ")" Then oTextCursor.gotoNextSentence(bExpand) From 8aac8d36e5b8b3663e9e41821a9f7eab6ce0acfb Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Mon, 23 Nov 2015 06:11:00 -0800 Subject: [PATCH 15/27] Buf fixes for "cw", "dw", "cb", "db", "ce", "de" "cw", "dw", "cb", "db", "ce", and "de" should all now work as they do in vim. --- src/vibreoffice.vbs | 99 +++++++++++++++++++++++++++++++-------------- 1 file changed, 68 insertions(+), 31 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index ec4776d..b2ed6ac 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -975,64 +975,101 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ElseIf keyChar = "G" Then oTextCursor.gotoEnd(bExpand) ElseIf keyChar = "w" or keyChar = "W" Then - ' Using soley gotoNextWord would mean that the cursor would not be - ' moved to the next word when it involved moving down a line and - ' that line happened to begin with whitespace. It would also mean that - ' the cursor would not skip over lines that only contain whitespace. + ' For the case when the user enters "cw": + If getSpecial() = "c" Then + ' If the cursor is on a word then delete from the current position to + ' the end of the word. + ' If the cursor is not on a word then delete from the current position + ' to the start of the next word or until the end of the line. - oTextCursor.gotoNextWord(bExpand) - getCursor().gotoRange(oTextCursor.getStart(), False) - ' Stop looping when the cursor reaches the start of a word, an empty - ' line, or cannot be moved further (reaches end of file). - Do Until oTextCursor.isStartOfWord() Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) - ' gotoNextWord returns false when it cannot further advance the - ' cursor. - If NOT oTextCursor.gotoNextWord(bExpand) Then - Exit Do + If NOT getCursor().isAtEndOfLine() Then + ' Move cursor to right in case it is already at start or end of + ' word. + oTextCursor.goRight(1, bExpand) + getCursor().goRight(1, bExpand) End If - getCursor().gotoRange(oTextCursor.getStart(), False) - Loop + + Do Until oTextCursor.isEndOfWord() Or oTextCursor.isStartOfWord() Or getCursor().isAtEndOfLine() + oTextCursor.goRight(1, bExpand) + getCursor().goRight(1, bExpand) + Loop + + ' For the case when the user enters "w" or "dw": + Else + ' For "w", using gotoNextWord would mean that the cursor would not + ' be moved to the next word when it involved moving down a line and + ' that line happened to begin with whitespace. It would also mean + ' that the cursor would not skip over lines that only contain + ' whitespace. + + If NOT (getSpecial() = "d" And getCursor().isAtEndOfLine()) Then + ' Move cursor to right in case cursor is already at the start + ' of a word. + ' Additionally for "w", move right in case already on an empty + ' line. + oTextCursor.goRight(1, bExpand) + getCursor().goRight(1, bExpand) + End If + + ' Stop looping when the cursor reaches the start of a word, an empty + ' line, or cannot be moved further (reaches end of file). + ' Additionally, if "dw" then stop looping if end of line is reached. + Do Until oTextCursor.isStartOfWord() Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) + ' If "dw" then do not delete past the end of the line + If getSpecial() = "d" And getCursor().isAtEndOfLine() Then + Exit Do + ' If "w" then stop advancing cursor if cursor can no longer + ' move right + ElseIf NOT oTextCursor.goRight(1, bExpand) Then + Exit Do + End If + getCursor().goRight(1, bExpand) + Loop + End If ElseIf keyChar = "b" or keyChar = "B" Then + ' When the user enters "b", "cb", or "db": + ' The function gotoPreviousWord causes a lot of problems when trying ' to emulate vim behavior. The following method doesn't have to ' account for as many special cases. - ' Move cursor to left in case cursor is already at the start of a word - ' or is already on an empty line. + ' Moves the cursor to the start of the previous word or until an empty + ' line is reached. + + ' Move cursor to left in case cursor is already at the start + ' of a word or on on an empty line. oTextCursor.goLeft(1, bExpand) getCursor().goLeft(1, bExpand) - ' Move cursor left to the start of previous word or until it hits an - ' empty line or until it can't move left anymore (reaches first line). - ' gotoStartOfWord gets stuck sometimes so manually moving the cursor - ' left is necessary in these cases. - Do Until oTextCursor.gotoStartOfWord(bExpand) Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) - ' If cursor can no longer move left then break loop + ' Stop looping when the cursor reaches the start of a word, an empty + ' line, or cannot be moved further (reaches start of file). + Do Until oTextCursor.isStartOfWord() Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) + ' Stop moving cursor if cursor can no longer move left If NOT oTextCursor.goLeft(1, bExpand) Then Exit Do End If getCursor().goLeft(1, bExpand) Loop ElseIf keyChar = "e" Then + ' When the user enters "e", "ce", or "de": + ' The function gotoNextWord causes a lot of problems when trying to ' emulate vim behavior. The following method doesn't have to account ' for as many special cases. - ' Move cursor to right in case cursor is already at the end of a word - ' or is already on an empty line. - oTextCursor.goRight(1, bExpand) - getCursor().goRight(1, bExpand) + ' Moves the cursor to the end of the next word or end of file if there + ' are no more words. + + ' Move cursor to right in case cursor is already at the end of a word. + oTextCursor.goRight(1, bExpand) - ' Move cursor right to the end of next word or until it hits an empty - ' line or until it can't move right anymore (reaches first line). ' gotoEndOfWord gets stuck sometimes so manually moving the cursor ' right is necessary in these cases. - Do Until oTextCursor.gotoEndOfWord(bExpand) Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) + Do Until oTextCursor.gotoEndOfWord(bExpand) ' If cursor can no longer move right then break loop If NOT oTextCursor.goRight(1, bExpand) Then Exit Do End If - getCursor().goRight(1, bExpand) Loop ElseIf keyChar = ")" Then From df8d64020458b301ffff577a0708745c3d8cd663 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Tue, 24 Nov 2015 01:05:46 -0800 Subject: [PATCH 16/27] Adds "X" and small fix for "cw" "X" (capital x) will delete to the left like it does vim. Small fixes for "cw" and a few other improvements. --- src/vibreoffice.vbs | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index b2ed6ac..de5f7ad 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -571,7 +571,7 @@ Function ProcessNormalKey(keyChar, modifiers) End If ' Only 'x' or Special (dd, cc) can be done more than once - If keyChar <> "x" and getSpecial() = "" Then + If keyChar <> "x" And keyChar <> "X" And getSpecial() = "" Then iIterations = 1 End If For i = 1 To iIterations @@ -687,8 +687,12 @@ Function ProcessSpecialKey(keyChar) bMatched = False - ElseIf keyChar = "x" Then + ElseIf keyChar = "x" Or keyChar = "X" Then oTextCursor = getTextCursor() + If keyChar = "X" And MODE <> "VISUAL" Then + oTextCursor.collapseToStart() + oTextCursor.goLeft(1, True) + End If thisComponent.getCurrentController.Select(oTextCursor) yankSelection(True) @@ -980,18 +984,16 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' If the cursor is on a word then delete from the current position to ' the end of the word. ' If the cursor is not on a word then delete from the current position - ' to the start of the next word or until the end of the line. + ' to the start of the next word or until the end of the paragraph. - If NOT getCursor().isAtEndOfLine() Then + If NOT oTextCursor.isEndOfParagraph() Then ' Move cursor to right in case it is already at start or end of ' word. oTextCursor.goRight(1, bExpand) - getCursor().goRight(1, bExpand) End If - Do Until oTextCursor.isEndOfWord() Or oTextCursor.isStartOfWord() Or getCursor().isAtEndOfLine() + Do Until oTextCursor.isEndOfWord() Or oTextCursor.isStartOfWord() Or oTextCursor.isEndOfParagraph() oTextCursor.goRight(1, bExpand) - getCursor().goRight(1, bExpand) Loop ' For the case when the user enters "w" or "dw": @@ -1002,28 +1004,26 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' that the cursor would not skip over lines that only contain ' whitespace. - If NOT (getSpecial() = "d" And getCursor().isAtEndOfLine()) Then + If NOT (getSpecial() = "d" And oTextCursor.isEndOfParagraph()) Then ' Move cursor to right in case cursor is already at the start ' of a word. ' Additionally for "w", move right in case already on an empty ' line. oTextCursor.goRight(1, bExpand) - getCursor().goRight(1, bExpand) End If ' Stop looping when the cursor reaches the start of a word, an empty ' line, or cannot be moved further (reaches end of file). - ' Additionally, if "dw" then stop looping if end of line is reached. - Do Until oTextCursor.isStartOfWord() Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) + ' Additionally, if "dw" then stop looping if end of paragraph is reached. + Do Until oTextCursor.isStartOfWord() Or (oTextCursor.isStartOfParagraph() And oTextCursor.isEndOfParagraph()) ' If "dw" then do not delete past the end of the line - If getSpecial() = "d" And getCursor().isAtEndOfLine() Then + If getSpecial() = "d" And oTextCursor.isEndOfParagraph() Then Exit Do ' If "w" then stop advancing cursor if cursor can no longer ' move right ElseIf NOT oTextCursor.goRight(1, bExpand) Then Exit Do End If - getCursor().goRight(1, bExpand) Loop End If ElseIf keyChar = "b" or keyChar = "B" Then @@ -1039,16 +1039,14 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' Move cursor to left in case cursor is already at the start ' of a word or on on an empty line. oTextCursor.goLeft(1, bExpand) - getCursor().goLeft(1, bExpand) ' Stop looping when the cursor reaches the start of a word, an empty ' line, or cannot be moved further (reaches start of file). - Do Until oTextCursor.isStartOfWord() Or (getCursor().isAtStartOfLine() And getCursor().isAtEndOfLine()) + Do Until oTextCursor.isStartOfWord() Or (oTextCursor.isStartOfParagraph() And oTextCursor.isEndOfParagraph()) ' Stop moving cursor if cursor can no longer move left If NOT oTextCursor.goLeft(1, bExpand) Then Exit Do End If - getCursor().goLeft(1, bExpand) Loop ElseIf keyChar = "e" Then ' When the user enters "e", "ce", or "de": From 206fec5ccb419cec43213052c391cab6eba7635a Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Tue, 24 Nov 2015 23:57:45 -0800 Subject: [PATCH 17/27] Makes "cw" and "bw" act more like vim. "cw" and "bw" now behave more like vim in very specific conditions. "cw" and "bw" should now work as they do in vim when the cursor is on the start of a paragraph before these commands are implemented. --- src/vibreoffice.vbs | 74 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 11 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index de5f7ad..d712dc6 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -998,11 +998,11 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' For the case when the user enters "w" or "dw": Else - ' For "w", using gotoNextWord would mean that the cursor would not - ' be moved to the next word when it involved moving down a line and - ' that line happened to begin with whitespace. It would also mean - ' that the cursor would not skip over lines that only contain - ' whitespace. + ' Note: For "w", using gotoNextWord would mean that the cursor + ' would not be moved to the next word when it involved moving down + ' a line and that line happened to begin with whitespace. It would + ' also mean that the cursor would not skip over lines that only + ' contain whitespace. If NOT (getSpecial() = "d" And oTextCursor.isEndOfParagraph()) Then ' Move cursor to right in case cursor is already at the start @@ -1029,16 +1029,43 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ElseIf keyChar = "b" or keyChar = "B" Then ' When the user enters "b", "cb", or "db": - ' The function gotoPreviousWord causes a lot of problems when trying - ' to emulate vim behavior. The following method doesn't have to + ' Note: The function gotoPreviousWord causes a lot of problems when + ' trying to emulate vim behavior. The following method doesn't have to ' account for as many special cases. - ' Moves the cursor to the start of the previous word or until an empty + ' "b": Moves the cursor to the start of the previous word or until an empty ' line is reached. - ' Move cursor to left in case cursor is already at the start - ' of a word or on on an empty line. - oTextCursor.goLeft(1, bExpand) + ' "db": Does same thing as "b" only it deletes everything between the + ' orginal cursor position and the new cursor position. The exception to + ' this is that if the original cursor position was at the start of a + ' paragraph and the new cursor position is on a separate paragraph with + ' at least two words then don't delete the new line char to the "left" + ' of the original paragraph. + + ' "dc": Does the same as "db" only the new line char described in "db" + ' above is never deleted. + + + ' This variable is used to tell whether or not we need to make a + ' distinction between "b", "cb", and "db". + dim dc_db as boolean + + ' Move cursor to left in case cursor is already at the start of a word + ' or on on an empty line. If cursor can move left and user enterd "dc" + ' or "db" and the cursor was originally on the start of a paragraph + ' then set dc_db to true and unselect the new line character separating + ' the paragraphs. If cursor can't move left then there is no line above + ' the current one and no need to make a distinction between "b", "cb", + ' and "db". + dc_db = False + If oTextCursor.isStartOfParagraph() And oTextCursor.goLeft(1, bExpand) Then + If getSpecial() = "c" Or getSpecial() = "d" Then + dc_db = True + ' If all conditions above are met then unselect the \n char. + oTextCursor.collapseToStart() + End If + End If ' Stop looping when the cursor reaches the start of a word, an empty ' line, or cannot be moved further (reaches start of file). @@ -1048,6 +1075,30 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) Exit Do End If Loop + + If dc_db Then + ' Make a clone of oTextCursor called oTextCursor2 and use it to + ' check if there are at least two words in the "new" paragraph. + ' If there are <2 words then the loop will stop when the cursor + ' cursor reaches the start of a paragraph. If there >=2 words then + ' then the loop will stop when the cursor reaches the end of a word. + dim oTextCursor2 + oTextCursor2 = getCursor().getText.createTextCursorByRange(oTextCursor) + Do Until oTextCursor2.isEndOfWord() Or oTextCursor2.isStartOfParagraph() + oTextCursor2.goLeft(1, bExpand) + Loop + ' If there are less than 2 words on the "new" paragraph then set + ' oTextCursor to oTextCursor 2. This is because vim's behavior is + ' to clear the "new" paragraph under these conditions. + If oTextCursor2.isStartOfParagraph() Then + oTextCursor = oTextCursor2 + oTextCursor.gotoRange(oTextCursor.getStart(), bExpand) + ' If user entered "db" then reselect the \n char from before. + If getSpecial() = "d" Then + oTextCursor.goRight(1, bExpand) + End If + End If + End If ElseIf keyChar = "e" Then ' When the user enters "e", "ce", or "de": @@ -1058,6 +1109,7 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' Moves the cursor to the end of the next word or end of file if there ' are no more words. + ' Move cursor to right in case cursor is already at the end of a word. oTextCursor.goRight(1, bExpand) From b6f0fe4f17623add5d915051e8728ec218a2a6de Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Thu, 26 Nov 2015 22:41:18 -0800 Subject: [PATCH 18/27] Adds "V" (linewise visual mode). Vibreoffice can now select by lines with "V" (visual_line mode). When in this mode lines can be selected with the j and k keys. This feature isn't perfect yet. Lines cannot yet be selected properly with the arrow keys and empty lines at the end of a selection are not always selected properly. --- src/vibreoffice.vbs | 118 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 102 insertions(+), 16 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index d712dc6..bf97cf1 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -36,6 +36,8 @@ global oXKeyHandler as object global MODE as string global VIEW_CURSOR as object global MULTIPLIER as integer +global VISUAL_BASE as object ' Line that is first selected when VISUAL_LINE + ' mode is entered ' ----------- ' Singletons @@ -89,13 +91,26 @@ Function gotoMode(sMode) setMode("INSERT") Case "VISUAL": setMode("VISUAL") - dim oTextCursor oTextCursor = getTextCursor() ' Deselect TextCursor oTextCursor.gotoRange(oTextCursor.getStart(), False) ' Show TextCursor selection thisComponent.getCurrentController.Select(oTextCursor) + Case "VISUAL_LINE": + setMode("VISUAL_LINE") + ' Select the current line + dim oldPos, newPos + oldPos = getCursor().getPosition() + getCursor().gotoStartOfLine(True) + getCursor().collapseToStart() + getCursor().gotoEndOfLine(True) + newPos = getCursor().getPosition() + ' If gotoEndOfLine moved cursor to bellow line then move it back + If oldPos.Y() <> newPos.Y() Then + getCursor().goLeft(1, True) + End If + VISUAL_BASE = getCursor().getPosition() End Select End Function @@ -323,7 +338,7 @@ function KeyHandler_KeyPressed(oEvent) as boolean delaySpecialReset() ' If standard movement key (in VISUAL mode) like arrow keys, home, end - ElseIf MODE = "VISUAL" And ProcessStandardMovementKey(oEvent) Then + ElseIf (MODE = "VISUAL" Or MODE = "VISUAL_LINE") And ProcessStandardMovementKey(oEvent) Then ' Pass ' If bIsSpecial but nothing matched, return to normal mode @@ -400,7 +415,7 @@ Function ProcessStandardMovementKey(oEvent) bMatched = True - If MODE <> "VISUAL" Then + If (MODE <> "VISUAL" And MODE <> "VISUAL_LINE") Then bMatched = False 'Pass ElseIf c = 1024 Then @@ -480,6 +495,8 @@ Function ProcessModeKey(oEvent) gotoMode("INSERT") Case "v": gotoMode("VISUAL") + Case "V": + gotoMode("VISUAL_LINE") Case Else: bMatched = False End Select @@ -491,7 +508,7 @@ Function ProcessNormalKey(keyChar, modifiers) dim i, bMatched, bIsVisual, iIterations, bIsControl bIsControl = (modifiers = 2) or (modifiers = 8) - bIsVisual = (MODE = "VISUAL") ' is this hardcoding bad? what about visual block? + bIsVisual = (MODE = "VISUAL" Or MODE = "VISUAL_LINE") ' is this hardcoding bad? what about visual block? ' ---------------------- ' 1. Check Movement Key @@ -639,7 +656,7 @@ Function ProcessSpecialKey(keyChar) ' visual mode: delete selection - ElseIf MODE = "VISUAL" Then + ElseIf MODE = "VISUAL" Or MODE = "VISUAL_LINE" Then oTextCursor = getTextCursor() thisComponent.getCurrentController.Select(oTextCursor) @@ -677,7 +694,7 @@ Function ProcessSpecialKey(keyChar) oTextCursor.gotoStart(bExpand) getCursor().gotoRange(oTextCursor.getStart(), False) End If - ElseIf MODE = "NORMAL" Or MODE = "VISUAL" Then + ElseIf MODE = "NORMAL" Or MODE = "VISUAL" Or MODE = "VISUAL_LINE" Then setSpecial("g") End If @@ -689,7 +706,7 @@ Function ProcessSpecialKey(keyChar) ElseIf keyChar = "x" Or keyChar = "X" Then oTextCursor = getTextCursor() - If keyChar = "X" And MODE <> "VISUAL" Then + If keyChar = "X" And MODE <> "VISUAL" And MODE <> "VISUAL_LINE" Then oTextCursor.collapseToStart() oTextCursor.goLeft(1, True) End If @@ -703,7 +720,7 @@ Function ProcessSpecialKey(keyChar) gotoMode("NORMAL") ElseIf keyChar = "D" Or keyChar = "C" Then - If MODE = "VISUAL" Then + If MODE = "VISUAL" Or MODE = "VISUAL_LINE" Then ProcessMovementKey("^", False) ProcessMovementKey("$", True) ProcessMovementKey("l", True) @@ -763,7 +780,7 @@ Function ProcessSearchKey(oTextCursor, searchType, keyChar, bExpand) If Not bIsBackwards Then ' VISUAL mode will goRight AFTER the selection - If MODE <> "VISUAL" Then + If MODE <> "VISUAL" And MODE <> "VISUAL_LINE" Then ' Start searching from next character oTextCursor.goRight(1, bExpand) End If @@ -823,7 +840,7 @@ Function ProcessSearchKey(oTextCursor, searchType, keyChar, bExpand) ' If matched, then we want to select PAST the character ' Else, this will counteract some weirdness. hack either way - If Not bIsBackwards And MODE = "VISUAL" Then + If Not bIsBackwards And (MODE = "VISUAL" Or MODE = "VISUAL_LINE") Then oTextCursor.goRight(1, bExpand) End If @@ -944,17 +961,86 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ElseIf keyChar = "h" Then oTextCursor.goLeft(1, bExpand) - ' oTextCursor.goUp and oTextCursor.goDown SHOULD work, but doesn't (I dont know why). - ' So this is a weird hack ElseIf keyChar = "k" Then - 'oTextCursor.goUp(1, False) - getCursor().goUp(1, bExpand) + If MODE = "VISUAL_LINE" Then + dim originalLine + originalLine = getCursor().getPosition().Y() + ' If cursor is already on or above the Visual base line. + If getCursor().getPosition().Y() <= VISUAL_BASE.Y() Then + ' If on Visual base line then format it for selecting above + ' lines. + If VISUAL_BASE.Y() = getCursor().getPosition().Y() Then + getCursor().gotoEndOfLine(bExpand) + getCursor().collapseToEnd() + End If + + ' Move cursor to start of above line. + Do Until getCursor().getPosition().Y() < originalLine + If NOT getCursor().goUp(1, bExpand) Then + Exit Do + End If + Loop + getCursor().gotoStartOfLine(bExpand) + + ' If cursor is already bellow the Visual base line. + ElseIf getCursor().getPosition().Y() > VISUAL_BASE.Y() Then + getCursor().goUp(1, bExpand) + getCursor().gotoEndOfLine(bExpand) + ' Move cursor back in case gotoEndOfLine moved cursor down. + If getCursor().getPosition().Y() = originalLine Then + getCursor().goLeft(1, bExpand) + End If + End If + + Else + ' oTextCursor.goUp and oTextCursor.goDown SHOULD work, but doesn't (I dont know why). + ' So this is a weird hack + 'oTextCursor.goUp(1, False) + getCursor().goUp(1, bExpand) + End If bSetCursor = False ElseIf keyChar = "j" Then - 'oTextCursor.goDown(1, False) - getCursor().goDown(1, bExpand) + If MODE = "VISUAL_LINE" Then + ' If cursor is already on or bellow the Visual base line. + If getCursor().getPosition().Y() >= VISUAL_BASE.Y() Then + ' If on Visual base line then format it for selecting bellow + ' lines. + If VISUAL_BASE.Y() = getCursor().getPosition().Y() Then + getCursor().gotoStartOfLine(bExpand) + getCursor().collapseToStart() + getCursor().gotoEndOfLine(bExpand) + ' Move cursor back in case gotoEndOfLine moved cursor down. + If getCursor().getPosition().Y() > VISUAL_BASE.Y() Then + getCursor().goLeft(1, bExpand) + End If + End If + + ' Move cursor to end of bellow line. + dim bellowLine + getCursor().goDown(1, bExpand) + bellowLine = getCursor().getPosition().Y() + getCursor().gotoEndOfLine(bExpand) + ' Move cursor back in case gotoEndOfLine moved cursor down. + If getCursor().getPosition().Y() > bellowLine Then + getCursor().goLeft(1, bExpand) + End If + + ' If cursor is above the Visual base line. + ElseIf getCursor().getPosition().Y() < VISUAL_BASE.Y() Then + ' Move cursor to start of bellow line. + getCursor().goDown(1, bExpand) + getCursor().gotoStartOfLine(bExpand) + End If + + Else + ' oTextCursor.goUp and oTextCursor.goDown SHOULD work, but doesn't (I dont know why). + ' So this is a weird hack + 'oTextCursor.goDown(1, False) + getCursor().goDown(1, bExpand) + End If bSetCursor = False + ' ---------- ElseIf keyChar = "0" or keyChar = "^" Then From 393a0f788ce6d1cda0de3bd95f452462830d9f01 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Fri, 27 Nov 2015 22:09:26 -0800 Subject: [PATCH 19/27] Fix for "V" (visual select by line). Vibreoffice can now correctly select any line with "V" (visual select by line) using the j and k keys. The only downside to this fix is that when selecting lines downwards with "j" the cursor will always be on the line bellow the selection. Not a big deal, just not aesthetically pleasing. --- src/vibreoffice.vbs | 107 +++++++++++++++++++++++++++++--------------- 1 file changed, 70 insertions(+), 37 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index bf97cf1..4df8da8 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -36,8 +36,8 @@ global oXKeyHandler as object global MODE as string global VIEW_CURSOR as object global MULTIPLIER as integer -global VISUAL_BASE as object ' Line that is first selected when VISUAL_LINE - ' mode is entered +global VISUAL_BASE as object ' Position of line that is first selected when + ' VISUAL_LINE mode is entered ' ----------- ' Singletons @@ -82,6 +82,29 @@ Sub setMode(modeName) setRawStatus(modeName) End Sub +' Selects the current line and makes it the Visual base line for use with +' VISUAL_LINE mode. +Function formatVisualBase() + dim oTextCursor + oTextCursor = getTextCursor() + VISUAL_BASE = getCursor().getPosition() + + ' If current line is empty then select it. + If oTextCursor.isStartOfParagraph() And oTextCursor.isEndOfParagraph() Then + getCursor().goRight(1, False) + getCursor().goLeft(1, True) + Else + ' Select the current line by moving cursor to end of line and then + ' back to the start of line. + getCursor().gotoEndOfLine(False) + ' Move cursor back if gotoEndOfLine moved cursor down. + If getCursor().getPosition().Y() > VISUAL_BASE.Y() Then + getCursor().goLeft(1, True) + End If + getCursor().gotoStartOfLine(True) + End If +End Function + Function gotoMode(sMode) Select Case sMode Case "NORMAL": @@ -99,18 +122,8 @@ Function gotoMode(sMode) thisComponent.getCurrentController.Select(oTextCursor) Case "VISUAL_LINE": setMode("VISUAL_LINE") - ' Select the current line - dim oldPos, newPos - oldPos = getCursor().getPosition() - getCursor().gotoStartOfLine(True) - getCursor().collapseToStart() - getCursor().gotoEndOfLine(True) - newPos = getCursor().getPosition() - ' If gotoEndOfLine moved cursor to bellow line then move it back - If oldPos.Y() <> newPos.Y() Then - getCursor().goLeft(1, True) - End If - VISUAL_BASE = getCursor().getPosition() + ' Select the current line and set it as the Visual base line + formatVisualBase() End Select End Function @@ -963,19 +976,20 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ElseIf keyChar = "k" Then If MODE = "VISUAL_LINE" Then - dim originalLine - originalLine = getCursor().getPosition().Y() + ' This variable represents the line that the user last selected. + dim lastSelected + ' If cursor is already on or above the Visual base line. If getCursor().getPosition().Y() <= VISUAL_BASE.Y() Then + lastSelected = getCursor().getPosition().Y() ' If on Visual base line then format it for selecting above ' lines. If VISUAL_BASE.Y() = getCursor().getPosition().Y() Then - getCursor().gotoEndOfLine(bExpand) - getCursor().collapseToEnd() + getCursor().gotoEndOfLine(False) End If - ' Move cursor to start of above line. - Do Until getCursor().getPosition().Y() < originalLine + ' Move cursor to start of the line above last selected line. + Do Until getCursor().getPosition().Y() < lastSelected If NOT getCursor().goUp(1, bExpand) Then Exit Do End If @@ -984,12 +998,31 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' If cursor is already bellow the Visual base line. ElseIf getCursor().getPosition().Y() > VISUAL_BASE.Y() Then + ' Cursor will be under the last selected line so it needs to + ' be moved up before setting lastSelected. getCursor().goUp(1, bExpand) - getCursor().gotoEndOfLine(bExpand) - ' Move cursor back in case gotoEndOfLine moved cursor down. - If getCursor().getPosition().Y() = originalLine Then - getCursor().goLeft(1, bExpand) + lastSelected = getCursor().getPosition().Y() + ' Move cursor up another line to deselect the last selected + ' line. + getCursor().goUp(1, bExpand) + + ' For the case when the last selected line was the line bellow + ' the Visual base line, simply reformat the Visual base line. + If getCursor().getPosition().Y() = VISUAL_BASE.Y() Then + formatVisualBase() + + Else + ' Make sure that the current line is fully selected. + getCursor().gotoEndOfLine(bExpand) + + ' Make sure cursor is at the start of the line we + ' deselected. It needs to always be bellow the user's + ' selection when under the Visual base line. + If getCursor().getPosition().Y() < lastSelected Then + getCursor().goRight(1, bExpand) + End If End If + End If Else @@ -1007,23 +1040,22 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' If on Visual base line then format it for selecting bellow ' lines. If VISUAL_BASE.Y() = getCursor().getPosition().Y() Then - getCursor().gotoStartOfLine(bExpand) - getCursor().collapseToStart() + getCursor().gotoStartOfLine(False) getCursor().gotoEndOfLine(bExpand) - ' Move cursor back in case gotoEndOfLine moved cursor down. - If getCursor().getPosition().Y() > VISUAL_BASE.Y() Then - getCursor().goLeft(1, bExpand) + ' Move cursor to next line if not already there. + If getCursor().getPosition().Y() = VISUAL_BASE.Y() Then + getCursor().goRight(1, bExpand) End If + End If - ' Move cursor to end of bellow line. - dim bellowLine - getCursor().goDown(1, bExpand) - bellowLine = getCursor().getPosition().Y() - getCursor().gotoEndOfLine(bExpand) - ' Move cursor back in case gotoEndOfLine moved cursor down. - If getCursor().getPosition().Y() > bellowLine Then - getCursor().goLeft(1, bExpand) + If getCursor().goDown(1, bExpand) Then + getCursor().gotoStartOfLine(bExpand) + + ' If cursor is on last line then select from current position + ' to end of line. + Else + getCursor().gotoEndOfLine(bExpand) End If ' If cursor is above the Visual base line. @@ -1033,6 +1065,7 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) getCursor().gotoStartOfLine(bExpand) End If + Else ' oTextCursor.goUp and oTextCursor.goDown SHOULD work, but doesn't (I dont know why). ' So this is a weird hack From e1624b0f36f2ea4341ee637330606c76f1b569fb Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Fri, 27 Nov 2015 22:57:11 -0800 Subject: [PATCH 20/27] Version 1.1.1 Release. New Features: -"V", visual select by line -"X", delete to left of cursor Bug fixes: -"cw", "dw", "cb", "db", "ce", "de". -"e" --- README.md | 8 ++++---- dist/vibreoffice-1.1.1.oxt | Bin 0 -> 14371 bytes 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 dist/vibreoffice-1.1.1.oxt diff --git a/README.md b/README.md index c19dac4..84d1260 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ both vi/vim neophytes and experts alike. ### Installation/Usage The easiest way to install is to download the -[latest extension file](https://raw.github.com/linuxmage/vibreoffice/master/dist/vibreoffice-1.0.28.oxt) +[latest extension file](https://raw.github.com/linuxmage/vibreoffice/master/dist/vibreoffice-1.1.1.oxt) and open it with LibreOffice/OpenOffice. To enable/disable vibreoffice, simply select Tools -> Add-Ons -> vibreoffice. @@ -26,8 +26,8 @@ This will simply build the extension file from the template files in ### Features vibreoffice currently supports: -- Insert (`i`, `I`, `a`, `A`, `o`, `O`), Visual (`v`), Normal modes -- Movement keys: `hjkl`, `w`, `W`, `b`, `B`, `e`, `$`, `^`, `{}`, `()`, `C-d`, `C-u` +- Insert (`i`, `I`, `a`, `A`, `o`, `O`), Visual (`v`,`V`), Normal modes +- Movement keys: `hjkl`, `w`, `W`, `b`, `B`, `e`, `$`, `^`, `{}`, `()`, `C-d`, `C-u`, `gg`, `G` - Search movement: `f`, `F`, `t`, `T` - Number modifiers: e.g. `5w`, `4fa` - Replace: `r` @@ -43,7 +43,7 @@ If you are familiar with vi/vim, then vibreoffice should give very few surprises. However, there are some differences, primarily due to word processor-text editor differences or limitations of the LibreOffice API and/or my patience. -- Currently, I am using LibreOffice's built-in word/sentence movement which +- Currently, vibreoffice uses LibreOffice's built-in sentence movement which differs from vi's. It's sort of broken now but I plan to fix it eventually. - The concept of lines in a text editor is not quite analogous to that of a word processor. I made my best effort to incorporate the line analogy while keeping diff --git a/dist/vibreoffice-1.1.1.oxt b/dist/vibreoffice-1.1.1.oxt new file mode 100644 index 0000000000000000000000000000000000000000..1ad4f6a4b5a411c630d23b6ebbccb57d1811b3cd GIT binary patch literal 14371 zcmbW8Wpv$KlCF=LnVFfHDQ0G7W@d;vX2zK9n3>|3nVB6kGc&|={dM12oy_g|X6EWF z=}15H>{9L0uF_idDoBHXLIeKV48MDe|KsHU9^e4D01;DXV<$@o7fX9PX9iUjC;$k$ zw5Hl$yQ>Eb00{ID1OWKQLE!^~`f(%VKQR7*zZz&huIN8@tpAKL`HM+sYDe$l;qrG# zm{FC>ad}Bqhe}Gxahi#-No9#q2Bphk8EUCJdFfFZx%meMiSZ!D<|e>jqyPJdfc+TV z&C_}BKWDTn9UL(I;SH02IK1#c;|I*B(QbB=SFehDlOs4eI##t;y}IunOOImv%D)fCGIw;!)K<{ESs z@tIzy8kC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H 21/27] Fixes for gg, G, and VISUAL_LINE mode. gg and G will now work in visual and visual_line mode. visual_line mode works with arrow keys. --- src/vibreoffice.vbs | 49 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 4df8da8..72a2cc3 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -700,12 +700,34 @@ Function ProcessSpecialKey(keyChar) ' gg to go to beginning of text ElseIf keyChar = "g" Then If bIsSpecial Then - if getSpecial() = "g" Then - dim bExpand - bExpand = false - oTextCursor = getTextCursor() - oTextCursor.gotoStart(bExpand) - getCursor().gotoRange(oTextCursor.getStart(), False) + If getSpecial() = "g" Then + ' If cursor is to left of current visual selection then select + ' from right end of the selection to the start of file. + ' If cursor is to right of current visual selection then select + ' from left end of the selection to the start of file. + If MODE = "VISUAL" Then + dim oldPos + oldPos = getCursor().getPosition() + getCursor().gotoRange(getCursor().getStart(), True) + If NOT samePos(getCursor().getPosition(), oldPos) Then + getCursor().gotoRange(getCursor().getEnd(), False) + End If + + ' If in VISUAL_LINE mode and cursor is bellow the Visual base + ' line then move it to the Visual base line, reformat the + ' Visual base line, and move cursor to start of file. + ElseIf MODE = "VISUAL_LINE" Then + Do Until getCursor().getPosition().Y() <= VISUAL_BASE.Y() + getCursor().goUp(1, False) + Loop + If getCursor().getPosition().Y() = VISUAL_BASE.Y() Then + formatVisualBase() + End If + End If + + dim bExpand + bExpand = MODE = "VISUAL" Or MODE = "VISUAL_LINE" + getCursor().gotoStart(bExpand) End If ElseIf MODE = "NORMAL" Or MODE = "VISUAL" Or MODE = "VISUAL_LINE" Then setSpecial("g") @@ -1065,7 +1087,6 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) getCursor().gotoStartOfLine(bExpand) End If - Else ' oTextCursor.goUp and oTextCursor.goDown SHOULD work, but doesn't (I dont know why). ' So this is a weird hack @@ -1096,7 +1117,19 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) bSetCursor = False ElseIf keyChar = "G" Then - oTextCursor.gotoEnd(bExpand) + If MODE = "VISUAL_LINE" Then + ' If cursor is above Visual base line then move cursor down to it. + Do Until getCursor().getPosition.Y() >= VISUAL_BASE.Y() + getCursor().goDown(1, False) + Loop + ' If cursor is on Visual base line then move it to start of line. + If getCursor().getPosition.Y() = VISUAL_BASE.Y() Then + getCursor().gotoStartOfLine(False) + End If + End If + getCursor().gotoEnd(bExpand) + bSetCursor = False + ElseIf keyChar = "w" or keyChar = "W" Then ' For the case when the user enters "cw": If getSpecial() = "c" Then From e48346c55bc9adc8bf8339cfce829b18a301746e Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Sun, 29 Nov 2015 23:12:43 -0800 Subject: [PATCH 22/27] Fix for "a" and "p". "a" will now not move the cursor right before going into insert mode when the cursor is at the end of the paragraph. Without this fix "a" would go to the next paragraph before entering insert mode. "p" will now not move the cursor right before pasting when the cursor is at the end of the paragraph. Without this fix "p" would go to the next paragraph before pasting. --- src/vibreoffice.vbs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 72a2cc3..9b8f76b 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -476,12 +476,13 @@ Function ProcessModeKey(oEvent) End If ' Mode matching - dim bMatched + dim bMatched, oTextCursor bMatched = True + oTextCursor = getTextCursor() Select Case oEvent.KeyChar ' Insert modes Case "i", "a", "I", "A", "o", "O": - If oEvent.KeyChar = "a" Then getCursor().goRight(1, False) + If oEvent.KeyChar = "a" And NOT oTextCursor.isEndOfParagraph() Then getCursor().goRight(1, False) If oEvent.KeyChar = "I" Then ProcessMovementKey("^") If oEvent.KeyChar = "A" Then ProcessMovementKey("$") @@ -576,8 +577,10 @@ Function ProcessNormalKey(keyChar, modifiers) ' after that. Fix? ' -------------------- If keyChar = "p" or keyChar = "P" Then + dim oTextCursor + oTextCursor = getTextCursor() ' Move cursor right if "p" to paste after cursor - If keyChar = "p" Then + If keyChar = "p" And NOT oTextCursor().isEndOfParagraph() Then ProcessMovementKey("l", False) End If From 257f337ce5819527ef818a353ff9c07f47fef0c6 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Thu, 3 Dec 2015 23:24:41 -0800 Subject: [PATCH 23/27] Fixes for "^" and "V". "^" will now move to the first character of the line that is not a space or a tab (more like vim). Fixed a problem with "V" where it would not select the new line character at the end of the visual base line when moving up with "k". --- src/vibreoffice.vbs | 72 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 9b8f76b..cd1a32f 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -89,20 +89,15 @@ Function formatVisualBase() oTextCursor = getTextCursor() VISUAL_BASE = getCursor().getPosition() - ' If current line is empty then select it. - If oTextCursor.isStartOfParagraph() And oTextCursor.isEndOfParagraph() Then - getCursor().goRight(1, False) - getCursor().goLeft(1, True) - Else - ' Select the current line by moving cursor to end of line and then - ' back to the start of line. - getCursor().gotoEndOfLine(False) - ' Move cursor back if gotoEndOfLine moved cursor down. - If getCursor().getPosition().Y() > VISUAL_BASE.Y() Then + ' Select the current line by moving cursor to start of the bellow line and + ' then back to the start of the current line. + getCursor().gotoEndOfLine(False) + If getCursor().getPosition().Y() = VISUAL_BASE.Y() Then + If getCursor().goRight(1, False) Then getCursor().goLeft(1, True) End If - getCursor().gotoStartOfLine(True) End If + getCursor().gotoStartOfLine(True) End Function Function gotoMode(sMode) @@ -497,7 +492,7 @@ Function ProcessModeKey(oEvent) End If If oEvent.KeyChar = "O" Then - ProcessMovementKey("^") + ProcessMovementKey("0") getCursor().setString(chr(13)) If Not getCursor().isAtStartOfLine() Then ProcessMovementKey("h") @@ -653,7 +648,7 @@ Function ProcessSpecialKey(keyChar) bIsSpecialCase = (keyChar = "d" And getSpecial() = "d") Or (keyChar = "c" And getSpecial() = "c") If bIsSpecialCase Then - ProcessMovementKey("^", False) + ProcessMovementKey("0", False) ProcessMovementKey("j", True) oTextCursor = getTextCursor() @@ -759,7 +754,7 @@ Function ProcessSpecialKey(keyChar) ElseIf keyChar = "D" Or keyChar = "C" Then If MODE = "VISUAL" Or MODE = "VISUAL_LINE" Then - ProcessMovementKey("^", False) + ProcessMovementKey("0", False) ProcessMovementKey("$", True) ProcessMovementKey("l", True) Else @@ -780,7 +775,7 @@ Function ProcessSpecialKey(keyChar) ' S only valid in NORMAL mode ElseIf keyChar = "S" And MODE = "NORMAL" Then - ProcessMovementKey("^", False) + ProcessMovementKey("0", False) ProcessMovementKey("$", True) yankSelection(True) gotoMode("INSERT") @@ -1011,6 +1006,12 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' lines. If VISUAL_BASE.Y() = getCursor().getPosition().Y() Then getCursor().gotoEndOfLine(False) + ' Make sure that cursor is on the start of the line bellow + ' the Visual base line. This is needed to make sure the + ' new line character will be selected. + If getCursor().getPosition().Y() = VISUAL_BASE.Y() Then + getCursor().goRight(1, False) + End If End If ' Move cursor to start of the line above last selected line. @@ -1100,9 +1101,48 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' ---------- - ElseIf keyChar = "0" or keyChar = "^" Then + ElseIf keyChar = "0" Then getCursor().gotoStartOfLine(bExpand) bSetCursor = False + ElseIf keyChar = "^" Then + dim oldLine + oldLine = getCursor().getPosition().Y() + + ' Select all of the current line and put it into a string. + getCursor().gotoEndOfLine(False) + If getCursor().getPosition.Y() > oldLine Then + ' If gotoEndOfLine moved cursor to next line then move it back. + getCursor().goLeft(1, False) + End If + getCursor().gotoStartOfLine(True) + dim s as String + s = getCursor().String + + ' Undo any changes made to the view cursor, then move to start of + ' line. This way any previous selction made by the user will remain. + getCursor().gotoRange(oTextCursor, False) + getCursor().gotoStartOfLine(bExpand) + + ' This integer will be used to determine the position of the first + ' character in the line that is not a space or a tab. + dim i as Integer + i = 1 + + ' Iterate through the characters in the string until a character that + ' is not a space or a tab is found. + Do While i <= Len(s) + dim c + c = Mid(s,i,1) + If c <> " " And c <> Chr(9) Then + Exit Do + End If + i = i + 1 + Loop + + ' Move the cursor to the first non space/tab character. + getCursor().goRight(i - 1, bExpand) + bSetCursor = False + ElseIf keyChar = "$" Then dim oldPos, newPos oldPos = getCursor().getPosition() From a6e273aa2dd934e8f285cdc4daf9725169b07f17 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Thu, 3 Dec 2015 23:53:12 -0800 Subject: [PATCH 24/27] Version 1.1.4 Release. Bug Fixes: -"^" will now move to the first character of the line that is not a space or a tab (more like vim). -"gg" and "G" will now work in visual and visual_line mode. -Fixed a problem with "V" where it would not select the new line character at the end of the visual base line when moving up with "k". -"a" and "p" will now behave more like vim when the cursor is on the end or beginning of a paragraph. --- README.md | 5 +++-- dist/vibreoffice-1.1.4.oxt | Bin 0 -> 14982 bytes 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 dist/vibreoffice-1.1.4.oxt diff --git a/README.md b/README.md index 84d1260..2091bea 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ both vi/vim neophytes and experts alike. ### Installation/Usage The easiest way to install is to download the -[latest extension file](https://raw.github.com/linuxmage/vibreoffice/master/dist/vibreoffice-1.1.1.oxt) -and open it with LibreOffice/OpenOffice. +[latest extension file](https://raw.github.com/linuxmage/vibreoffice/master/dist/vibreoffice-1.1.4.oxt) +and open it with LibreOffice/OpenOffice. LibreOffice/OpenOffice will need to be restarted before this extension can be used. To enable/disable vibreoffice, simply select Tools -> Add-Ons -> vibreoffice. @@ -59,6 +59,7 @@ my patience. word processing. - Using `d`, `c` (or any of their variants) will temporarily bring you into Visual mode. This is intentional and should not have any noticeable effects. +- In OS X, repeating commands by holding down keys can have strange behavior. vibreoffice is new, so it is bound to have plenty of bugs. Please let me know if you run into anything! diff --git a/dist/vibreoffice-1.1.4.oxt b/dist/vibreoffice-1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>Q^Ws2{(Xb>KO5uElK=Y{q&-{(ok`Y*^om%RUkhk*Rs>V)|I O?tRbrvUdmo@P7cp{CPkC literal 0 HcmV?d00001 From 81204ff4e192096d29323e5623ae4220cb3c12ca Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Mon, 7 Dec 2015 00:42:49 -0800 Subject: [PATCH 25/27] Fix for "e". VibreOffice defines the cursor at being at the end of a word when the cursor is to the right of the last character. Pressing "i" after following this definition would start inserting after the word and not before the last character like it does in vim. This fix changes the "e" behavior so it now will move one character to the left after reaching LibreOffice's definition of end of word in cases when it is appropriate. --- src/vibreoffice.vbs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index cd1a32f..16bdbf7 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -1105,6 +1105,8 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) getCursor().gotoStartOfLine(bExpand) bSetCursor = False ElseIf keyChar = "^" Then + ' This variable represents the original line the cursor was on before + ' any of the following changes. dim oldLine oldLine = getCursor().getPosition().Y() @@ -1305,8 +1307,9 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ' are no more words. - ' Move cursor to right in case cursor is already at the end of a word. - oTextCursor.goRight(1, bExpand) + ' Move cursor to right by two in case cursor is already at the end of a + ' word. + oTextCursor.goRight(2, bExpand) ' gotoEndOfWord gets stuck sometimes so manually moving the cursor ' right is necessary in these cases. @@ -1317,6 +1320,13 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) End If Loop + ' gotoEndOfWord moves the cursor one character further than vim does so + ' move it back one if end of word is reached and not expanding + ' selection. + If NOT bExpand And oTextCursor.isEndOfWord() Then + oTextCursor.goLeft(1, bExpand) + End If + ElseIf keyChar = ")" Then oTextCursor.gotoNextSentence(bExpand) ElseIf keyChar = "(" Then From b56b17e239bbf28cb19f9a91557815612e5482f8 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Mon, 7 Dec 2015 22:16:16 -0800 Subject: [PATCH 26/27] Fix for "e" in relation to words ending with a "." LibreOffice considers a "." directly after the end of a word to be the end of word. Before this fix, pressing "e" would move the cursor to the "." in these cases instead of to the last character of the word like in Vim. --- src/vibreoffice.vbs | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index 16bdbf7..e3c46cb 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -1299,18 +1299,26 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) ElseIf keyChar = "e" Then ' When the user enters "e", "ce", or "de": - ' The function gotoNextWord causes a lot of problems when trying to - ' emulate vim behavior. The following method doesn't have to account + ' Note: The function gotoNextWord causes a lot of problems when trying + ' to emulate vim behavior. The following method doesn't have to account ' for as many special cases. ' Moves the cursor to the end of the next word or end of file if there ' are no more words. - - ' Move cursor to right by two in case cursor is already at the end of a - ' word. + ' Move cursor to right by two in case cursor is already at vim's + ' definition of endOfWord. oTextCursor.goRight(2, bExpand) + ' If moving cursor to right by 2 places cursor just to the right of a + ' "." then move cursor right again. This is needed to ensure that the + ' cursor does not get stuck. + getCursor().gotoRange(oTextCursor.getEnd(), False) + getCursor().goLeft(1, True) + If getCursor().String = "." Then + oTextCursor.goRight(1, bExpand) + End If + ' gotoEndOfWord gets stuck sometimes so manually moving the cursor ' right is necessary in these cases. Do Until oTextCursor.gotoEndOfWord(bExpand) @@ -1320,11 +1328,22 @@ Function ProcessMovementKey(keyChar, Optional bExpand, Optional keyModifiers) End If Loop - ' gotoEndOfWord moves the cursor one character further than vim does so - ' move it back one if end of word is reached and not expanding - ' selection. - If NOT bExpand And oTextCursor.isEndOfWord() Then - oTextCursor.goLeft(1, bExpand) + If oTextCursor.isEndOfWord() Then + ' LibreOffice defines a "." directly following a word to be the + ' endOfWord and vim does not. So in this case we need to move the + ' the cursor to the left. + getCursor().gotoRange(oTextCursor.getEnd(), False) + getCursor().goLeft(1, True) + If getCursor().String = "." Then + oTextCursor.goLeft(1, bExpand) + End If + + ' gotoEndOfWord moves the cursor one character further than vim + ' does so move it back one if end of word is reached and not + ' expanding selection. + If NOT bExpand Then + oTextCursor.goLeft(1, bExpand) + End If End If ElseIf keyChar = ")" Then From 3cf3f52df8a77c0b954dd84fb8a6e2b25cb93cd9 Mon Sep 17 00:00:00 2001 From: LinuxMage Date: Tue, 22 Dec 2015 14:37:58 -0800 Subject: [PATCH 27/27] Fix for "V" when selecting the Visual Base Line. Before this fix the first line selected in "V" mode wasn't always selected correctly. --- src/vibreoffice.vbs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vibreoffice.vbs b/src/vibreoffice.vbs index e3c46cb..de55d9f 100644 --- a/src/vibreoffice.vbs +++ b/src/vibreoffice.vbs @@ -93,10 +93,9 @@ Function formatVisualBase() ' then back to the start of the current line. getCursor().gotoEndOfLine(False) If getCursor().getPosition().Y() = VISUAL_BASE.Y() Then - If getCursor().goRight(1, False) Then - getCursor().goLeft(1, True) - End If + getCursor().goRight(1, False) End If + getCursor().goLeft(1, True) getCursor().gotoStartOfLine(True) End Function