Config file and modules in this repository help to apply the key map anywhere in Typora and others. Enjoy your vimlife with Hammerspoon!
설정파일 구현과정은 블로그에서 확인하실 수 있습니다.
- Add English conversion to Esc key.
- When you put 'esc' key, input source will be chagned to English if current input source is not English.
- It will be helpful when usinge vim with non-English input source.
- 'vim_keymap mode' for text editor like typora, tistory..etc.
- In fact, it's just a simulation of acting like a vim keymap in a text editor like typora.
- You can turn on and off 'vim_keymap mode'. Default shorcut is {"cmd' + "shift"} + "space". You can customize it with
~/.hammerspoon/init.lua
. - Marked by a menu icon, it is easy to see if the function is turned on.
From | To |
---|---|
h | left |
j | down |
k | up |
l | right |
x | forward Delete (not cut) |
w | next word |
b | prev word |
i | insert mode |
a | append |
o | open below |
p | paste after |
u | undo |
shift + d | delete cursor to eol (not cut) |
shift + a | append at eol |
shift + o | open above |
y + y | copy one line |
d + d | delete one line (not cut) |
d + w | delete next word (not cut) |
d + b | delete prev word (not cut) |
If you are a skillful Hammerspoon user, just copy and paste the init.lua and modules.
If you are new to Hammerspoon, follow the process below.
brew install --cask hammerspoon
- Download Hammerspoon-x.x.xx.zip from this link
- Unzip downloaded file and move 'hammerspoon' file to
Applications
directory (한국어로 응용 프로그램 폴더)
git clone https://github.com/humblEgo/vimlife_with_hammerspoon.git && cd vimlife_with_hammerspoon && ./init.sh
Maybe you can find 'Hammerspoon' icon in launchpad. Click it.
Or just use Spotlight/Alfred.
In my case, execute hammerspoon with 'spotlight'.
I'd appreciate it if you could tell me about the modifications. Also, if you want to add a vim keymap, please feel free to send me PR or issue! :)