File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ i::Vim.State.SetMode("Insert")
7
7
Return
8
8
9
9
a ::
10
- Send , {Right }
10
+ if (Vim.CheckChr(" `n" )){
11
+ Send , {Left }
12
+ }else {
13
+ Send , {Right }
14
+ }
11
15
Vim.State.SetMode(" Insert" )
12
16
Return
13
17
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.0 "
24
- this.About.Date := " 24/Jan /2022"
23
+ this.About.Version := " v0.11.1 "
24
+ this.About.Date := " 11/Feb /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"
@@ -252,7 +252,7 @@ class VimAhk{
252
252
, " ahk_exe Q-Dir.exe" ] ; Q-dir
253
253
254
254
DefaultGroup := ""
255
- For i, v in DefaultList
255
+ for i, v in DefaultList
256
256
{
257
257
if (DefaultGroup == "" ){
258
258
DefaultGroup := v
@@ -273,4 +273,21 @@ class VimAhk{
273
273
}
274
274
Return True
275
275
}
276
+
277
+ ; Ref: https://www.reddit.com/r/AutoHotkey/comments/4ma5b8/identifying_end_of_line_when_typing_with_ahk_and/
278
+ CheckChr (key ){
279
+ BlockInput , Send
280
+ tempClip := clipboard
281
+ clipboard := ""
282
+ SendInput {Shift Down }{Right }{Shift up }{Ctrl down }c{Ctrl Up }{Left }
283
+ Sleep 10
284
+ ret := False
285
+ If (clipboard ~ = key){
286
+ ret := True
287
+ }
288
+ sleep 10
289
+ clipboard := tempClip
290
+ BlockInput , off
291
+ Return ret
292
+ }
276
293
}
You can’t perform that action at this time.
0 commit comments