0

I´m new to Vim and I want to use autohotkey to make it so that, if I open Vim on PowerShell, the Esc key is Remapped to the CapsLock key so that I can change from Insert to Visual Mode faster.

I tried running this script:

#HotIf WinActive('Title' 'ahk_class ConsoleWindowClass')
#HotIf WinActive('vim')
CapsLock::Esc
#HotIf WinActive
#HotIf WinActive

But it didn't seem to work.

2
  • 2
    Correction, pressing the <Esc> key in insert mode puts you back in normal mode, not visual mode. Commented Dec 20, 2024 at 7:12
  • well I have no idea of autohotkey, but a quick google gave me several options one of them is indeed autohotkey vim.fandom.com/wiki/… it looks like the if structure should end in HotIf not HotIf WinActive but that could both work. So if that is not the issue, I would guess your ifs to not match... Commented Dec 20, 2024 at 12:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.