LoginSignup
15
13

More than 5 years have passed since last update.

autohotkey+無変換でどこでもvimライク

Posted at

autohotkeyでvimライク

autohotkeyをダウンロードして、下記スクリプトをコピペして作成。
実行してください。

sc07B & h::Send,{Blind}{Left}
sc07B & j::Send,{Blind}{Down}
sc07B & k::Send,{Blind}{Up}
sc07B & l::Send,{Blind}{Right}
sc07B & y::Send,{Blind}{Home}
sc07B & u::Send,{Blind}{PgDn}
sc07B & i::Send,{Blind}{PgUp}
sc07B & o::Send,{Blind}{End}
sc07B & x::
  If GetKeyState("Shift","P")
    Send,{Blind}{Backspace}
  Else
    Send,{Blind}{Delete}
  Return

▼説明
無変換押しながら下記のキーを押すと挙動が変わります。

hjkl: 矢印移動
yuio: 前からhome pagedown pageup end
x: delete
shift+x: backspace

すごく便利~!
カスタマイズしてもお使いください。

ifつかってるのは&で繋げられるのは2つまでなので。
通常の修飾キー(shift、control、alt)は別シンボルに置き換えられるので、3つ以上も可能です。

▼修飾キーとシンボルの対応(Key: Syntax)

Alt: !
Ctrl: ^
Shift: +
Win Logo: #

▼例: ctrl+shift+o

^+o::Send,{Blind}{End}

無変換バインドは親指が痛いのがネック!

ちなみにmacは別の便利なソフトがあります。
https://pqrs.org/osx/karabiner/index.html.ja

15
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
13