File tree Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Original file line number Diff line number Diff line change 20
20
21
21
class VimAhk{
22
22
__About (){
23
- this.About.Version := " v0.11.3 "
24
- this.About.Date := " 14/Feb /2022"
23
+ this.About.Version := " v0.11.5 "
24
+ this.About.Date := " 16/Sep /2022"
25
25
this.About.Author := " rcmdnk"
26
26
this.About.Description := " Vim emulation with AutoHotkey, everywhere in Windows."
27
27
this.About.Homepage := " https://github.com/rcmdnk/vim_ahk"
@@ -66,8 +66,9 @@ class VimAhk{
66
66
GroupAdd , VimDoubleHomeGroup, ahk_exe Code.exe ; Visual Studio Code
67
67
68
68
; Followings can emulate ^. For others, ^ works as same as 0
69
- GroupAdd , VimCaretMove, ahk_exe notepad.exe ; NotePad
70
- GroupAdd , VimCaretMove, ahk_exe Notepad.exe ; NotePad
69
+ ; It does not work for NotePad at Windows 11
70
+ ; GroupAdd, VimCaretMove, ahk_exe notepad.exe ; NotePad
71
+ ; GroupAdd, VimCaretMove, ahk_exe Notepad.exe ; NotePad
71
72
72
73
; Followings start cursor from the same place after selection.
73
74
; Others start right/left (by cursor) point of the selection
Original file line number Diff line number Diff line change 13
13
14
14
if (this.Vim.State.IsCurrentVimMode(" Vim_VisualLineFirst" )) and (key == " k" or key == " ^u" or key == " ^b" or key == " g" ){
15
15
Send , {Shift Up }{End }
16
- this.Home ()
16
+ this.Zero ()
17
17
Send , {Shift Down }
18
18
this.Up ()
19
19
this.vim.state.setmode(" Vim_VisualLine" )
26
26
if (this.Vim.State.StrIsInCurrentVimMode(" Vim_ydc" )) and (key == " k" or key == " ^u" or key == " ^b" or key == " g" ){
27
27
this.Vim.State.LineCopy := 1
28
28
Send ,{Shift Up }
29
- this.Home ()
29
+ this.Zero ()
30
30
this.Down ()
31
31
Send , {Shift Down }
32
32
this.Up ()
33
33
}
34
34
if (this.Vim.State.StrIsInCurrentVimMode(" Vim_ydc" )) and (key == " j" or key == " ^d" or key == " ^f" or key == " +g" ){
35
35
this.Vim.State.LineCopy := 1
36
36
Send ,{Shift Up }
37
- this.Home ()
37
+ this.Zero ()
38
38
Send , {Shift Down }
39
39
this.Down ()
40
40
}
69
69
send {Ctrl Up }
70
70
}
71
71
72
- Home (){
72
+ Zero (){
73
73
if WinActive (" ahk_group VimDoubleHomeGroup" ){
74
74
Send , {Home }
75
75
}
124
124
}
125
125
; Home/End
126
126
}else if(key == " 0" ){
127
- this.Home ()
127
+ this.Zero ()
128
128
}else if(key == " $" ){
129
129
if (this.shift == 1 ){
130
130
Send , + {End }
133
133
}
134
134
}else if(key == " ^" ){
135
135
if (this.shift == 1 ){
136
- if WinActive (" ahk_group VimCaretMove" ){
137
- this.Home ()
138
- Send , ^ {Right }
139
- Send , ^ {Left }
140
- }else {
141
- this.Home ()
142
- }
143
- }else {
144
136
if WinActive (" ahk_group VimCaretMove" ){
145
137
Send , + {Home }
146
138
Send , +^ {Right }
147
139
Send , +^ {Left }
148
140
}else {
149
141
Send , + {Home }
150
142
}
143
+ }else {
144
+ if WinActive (" ahk_group VimCaretMove" ){
145
+ Send , {Home }
146
+ Send , ^ {Right }
147
+ Send , ^ {Left }
148
+ }else {
149
+ Send , {Home }
150
+ }
151
151
}
152
152
; Words
153
153
}else if(key == " w" ){
209
209
210
210
YDCMove (){
211
211
this.Vim.State.LineCopy := 1
212
- this.Home ()
212
+ this.Zero ()
213
213
Send , {Shift Down }
214
214
if (this.Vim.State.n == 0 ){
215
215
this.Vim.State.n := 1
You can’t perform that action at this time.
0 commit comments