Skip to content

godbout/kindaVim.docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

kindaVim brings Vim motions to macOS Text Fields, Text Areas, Dropdowns, Lists, Menus... 🥱️ basically everywhere.

awesome stuff happening in there


The Site

kindavim.app for all the fancy stuff.

Why kindaVim

Because Vim moves anywhere is fucking cool. And also kV makes using the keyboard more consistent on the whole macOS, where sometimes CTRL-P/CTRL-N go up/down lists, but sometimes it doesn't. Thanks Apple.

License

Unlimited trial. The trial is: without a coffee a month kindaVim sleeps in the mornings. (It will scold you from the Menu Bar when you'll try to use it.) You're still able to use it fully-featured the afternoons. (Until 5am the next day. Those are long afternoons, yes.) So if you're like me and spend your mornings reading, swimming in the open sea or climbing rocks, then kV is basically free.

Current Vim Implementation

Note
If you find that you're missing a motion, command, a count support, or a repeat, just make a request.

Motions

Note
For motions that accept regexes, kV uses the ICU Regular Expressions (Perl) rather than Vim's own flavor ones.

kV's Accessibility Strategy: text manipulation; accurate.

kV detects automatically which Strategy to use, but sometimes you may wish to enforce the Keyboard Strategy even when the text is Accessible. You can do so by pressing fn while doing a move. This is useful when you're in a text input but want to scroll through the UI (scrollbars) rather than the text/caret, or to move from one input to another in some apps with custom UI (e.g. Things 3, Logseq).

Normal Mode count repeat          Visual Mode count repeat
_ ✅️ _ ✅️️
- ✅️ , ✅️
, ✅️ ; ✅️
; ✅️ ( ❌️
? ✅️ ) ❌️
?<CR> ✅️ { ❌️
( ❌️ } ❌️
) ^
[( ❌️ +, <CR>, CTRL-M, <Enter> ✅️
[{ ❌️ < ✅️
]) ❌️ > ✅️
]} ❌️ $, <End> ✅️️
{ ❌️ ~
} ❌️ 0
/ ✅️ a' ❌️
/<CR> ✅️ a" ❌️
% a[, a] ❌️
^ a<, a> ❌️
+, <CR>, <CTRL-M>, <Enter> ✅️️ a` ❌️
<< ✅️️ ✅️️ aB, a{, a} ❌️
>> ✅️️ ✅️️ ab, a(, a) ❌️
~ ✅️ ap ❌️
$, <End> ✅️ B, <C-Left> ✅️
0 b, <S-Left> ✅️
A ❌️ ❌️ C
a ❌️ CTRL-[, <Esc>
B, <C-Left> ✅️️ c, s
b, <S-Left> ✅️️ D
C, c$, c<End> ❌️ ❌️ d, <Del>, x
CTRL-B, <PageUp>, <S-Up> E ✅️
CTRL-D e ✅️
CTRL-F, <PageDown>, <S-Down> F ✅️
CTRL-R ✅️ f ✅️
CTRL-U G ✅️
c0 ❌️ g_ ✅️
ca' ❌️ ❌️ g^
ca" ❌️ ❌️ g$, g<End> ✅️️
ca[, ca] ❌️ ❌️ g0, g<Home>
ca<, ca> ❌️ ❌️ gE ✅️
ca` ❌️ ❌️ ge ✅️
caB, ca{, ca} ❌️ ❌️ gg ✅️
cab, ca(, ca) ❌️ ❌️ gI
cap ❌️ ❌️ gj, g<Down> ✅️
caW ❌️ ❌️ gk, g<Up> ✅️
caw ❌️ ❌️ gx
cB ✅️️ ❌️ h, <BS>, CTRL-H, <Left> ✅️
cb ✅️️ ❌️ i' ❌️
cc ❌️ ❌️ i" ❌️
cE ✅️️ ❌️ i[, i] ❌️
ce ✅️️ ❌️ i<, i> ❌️
cF ✅️ ❌️ i` ❌️
cf ✅️ ❌️ iB, i{, i} ❌️
ch, c<BS>, cCTRL-H, c<Left> ✅️ ❌️ ib, i(, i) ❌️
cG ❌️ ❌️ ip ❌️
cg$, cg<End> ❌️ ❌️ iW ❌️
cg0, cg<Home> ❌️ iw ❌️
cgg ❌️ ❌️ j, CTRL-J, CTRL-N, <Down> ✅️
ci' ❌️ ❌️ k, CTRL-P, <Up> ✅️
ci" ❌️ ❌️ l, <Right>, <Space> ✅️
ci[, ci] ❌️ ❌️ o
ci<, ci> ❌️ ❌️ P ❌️
ci` ❌️ ❌️ p ❌️
ciB, ci{, ci} ❌️ ❌️ R
cib, ci(, ci) ❌️ ❌️ S
cip ❌️ ❌️ T ✅️
ciW ❌️ ❌️ t ✅️️
ciw ❌️ ❌️ U
cj, cCTRL-J, cCTRL-N, c<Down> ❌️ ❌️ u
ck, cCTRL-P, c<Up> ❌️ ❌️ V ❌️
cT ✅️ ❌️ v ❌️
ct ✅️ ❌️ W, <C-Right> ✅️
cW ❌️ ❌️ w, <S-Right> ✅️
cw ❌️ ❌️ X
D, d$, d<End> ❌️ ✅️️ Y
d0 ✅️️ y
da' ❌️ ✅️️
da" ❌️ ✅️️
da[, da] ❌️
da<, da> ❌️
da` ❌️ ✅️️
daB, da{, da} ❌️
dab, da(, da) ❌️
dap ❌️ ✅️️
daW ❌️ ✅️️
daw ❌️ ✅️️
dB ✅️️ ✅️️
db ✅️️ ✅️️
dd ❌️ ✅️
dE ✅️️ ✅️
de ✅️️ ✅️
dF ✅️
df ✅️
dG ❌️ ✅️
dg$, dg<End> ❌️ ✅️
dg0, dg<Home> ✅️
dgg ❌️ ✅️
di' ❌️ ✅️
di" ❌️ ✅️
di[, di] ❌️ ✅️
di<, di> ❌️ ✅️
di` ❌️ ✅️
diB, di{, di} ❌️ ✅️
dib, di(, di) ❌️ ✅️
dip ❌️ ✅️
diW ❌️ ✅️
diw ❌️ ✅️
dj, dCTRL-J, dCTRL-N, d<Down> ❌️
dk, dCTRL-P, d<Up> ❌️
dT ✅️
dt ✅️
dW ✅️ ✅️
dw ✅️ ✅️
E ✅️️
e ✅️️
F ✅️
f ✅️
G ✅️
g_ ✅️
g^
g$, g<End> ✅️
g0, g<Home>
gE ✅️️
ge ✅️️
gg ✅️
gI ❌️
gj, g<Down> ✅️
gk, g<Up> ✅️
gm
gx
H ✅️
h, <BS>, CTRL-H, <Left> ✅️
I ❌️
i ❌️
J
j, CTRL-J, CTRL-N, <Down> ✅️
k, CTRL-P, <Up> ✅️
L
l, <Right>, <Space> ✅️
M
N ✅️
n ✅️
O ❌️
o ❌️
P ❌️
p ❌️
r ✅️
S ❌️
s, cl, c<Right>, c<Space> ✅️
T ✅️
t ✅️
u ✅️
W, <C-Right> ✅️️
w, <S-Right> ✅️️
X, dh, d<BS>, dCTRL-H, d<Left> ✅️ ✅️
x, <Del>, dl, d<Right>, d<Space> ✅️ ✅️
Y ✅️
y$, y<End> ️❌️
y0
ya' ❌️
ya" ❌️
ya[, ya] ❌️
ya<, ya> ❌️
ya` ❌️
yaB, ya{, ya} ❌️
yab, ya(, ya) ❌️
yap ❌️
yaW ❌️
yaw ❌️
yF ✅️
yf ✅️
yg$, yg<End> ️️❌️
yg0, yg<Home> ️️
yh, y<BS>, y<Left>, yCTRL-H ❌️
yi' ❌️
yi" ❌️
yi[, yi] ❌️
yi<, yi> ❌️
yi` ❌️
yiB, yi{, yi} ❌️
yib, yi(, yi) ❌️
yip ❌️
yiW ❌️
yiw ❌️
yl, y<Right>, y<Space> ❌️
yT ✅️
yt ✅️
yy ✅️
z- ❌️
z. ❌️
zb ❌️
z<CR> ❌️
zt ❌️
zz ❌️

kV's Keyboard Strategy: keyboard remapping; less accurate.

This is the fallback mode. If the app you're on doesn't handle the macOS Accessibility properly, then kV will use different sets of key remapping (depending on whether you're on a Text Element, Non Text Element, TextField Element, TextArea Element, etc.) to impersonate a Vim move. Most of the time the fallback happens automatically, but some apps (usually Electron) falsely advertise their support of the macOS Accessibility, and need the Keyboard Strategy to be manually enforced through the Preferences, Families Pane.

Normal Mode count repeat          Visual Mode count repeat
_ ❌️ _ ❌️
- ✅️️ ^
? ❌️ +, <CR>, CTRL-M, <Enter> ✅️
?<CR> ❌️ $, <End> ❌️
/ ❌️ 0
/<CR> ❌️ b, <S-Left> ✅️️
^ C ❌️
+, <CR>, CTRL-M, <Enter> ✅️️ CTRL-[, <Esc>
<< ✅️️ c, s ❌️
>> ✅️️ D ❌️
$, <End> ❌️ d, <Del>, x ❌️
0 e ✅️️
A ❌️ ❌️ G ❌️
a ❌️ ❌️ g^
b, <S-Left> ✅️️ g_ ❌️
C, c$, c<End> ❌️ ❌️ g$, g<End> ❌️
CTRL-B, <PageUp>, <S-Up> ❌️ g0, g<Home>
CTRL-D ❌️ ge ✅️️
CTRL-F, <PageDown>, <S-Down> ❌️ gg ❌️
CTRL-R ✅️️ gI
CTRL-U ❌️ gj, g<Down> ✅️
c0 ❌️ gk, g<Up> ✅️
cb ✅️️ ❌️ h, <BS>, CTRL-H, <Left> ✅️
cc ❌️ ❌️ iw ❌️
ce ✅️️ ❌️ j, CTRL-J, CTRL-N, <Down> ✅️
cG ❌️ ❌️ k, CTRL-P, <Up> ✅️
cg$, cg<End> ❌️ ❌️ l, <Right>, <Space> ✅️
cg0, cg<Home> ❌️ P ❌️
cgg ❌️ ❌️ p ❌️
ch, c<BS>, cCTRL-H, c<Left> ✅️️ ❌️ R ❌️ ❌️
ciw ❌️ ❌️ S ❌️ ❌️
cj, cCTRL-J, cCTRL-N, c<Down> ❌️ ❌️ V ❌️
ck, cCTRL-P, c<Up> ❌️ ❌️ v ❌️
cw ✅️️ ❌️ w, <S-Right> ✅️️
D, d$, d<End> ❌️ X ❌️
d0 Y
db ✅️️ y
dd ❌️
de ✅️️
dG ❌️
dg$, dg<End> ❌️
dg0, dg<Home>
dgg ❌️
diw ❌️
dj, dCTRL-J, dCTRL-N, d<Down> ❌️
dk, dCTRL-P, d<Up> ❌️
dw ❌️
e ✅️️
G ❌️
g_ ❌️
g^
g$, g<End> ❌️
g0, g<Home>
ge ✅️️
gg ❌️
gI ❌️ ❌️
gj, g<Down> ✅️
gk, g<Up> ✅️
h, <BS>, CTRL-H, <Left> ✅️
I ❌️ ❌️
i ❌️ ❌️
J ❌️
j, CTRL-J, CTRL-N, <Down>
k, CTRL-P, <Up>
l, <Right>, <Space>
N ✅️
n ✅️
O ❌️ ❌️
o ❌️ ❌️
P ❌️ ❌️
p ❌️ ❌️
r ❌️ ❌️
S ❌️ ❌️
s, cl, c<Right>, c<Space> ✅️️ ❌️
u ✅️️ ❌️
w, <S-Right> ✅️️
X, dh, d<BS>, dCTRL-H, d<Left> ✅️️
x, <Del>, dl, d<Right>, d<Space> ✅️️
Y ❌️
y$, y<End> ❌️
y0
yg$, yg<End> ❌️
yg0, yg<Home>
yh, y<BS>, y<Left>, yCTRL-H ❌️
yiw ❌️
yl, y<Right>, y<Space> ❌️
yy ❌️
zz ❌️

Commands

Command count
:q
:q!
:w
:wq
:x
gT ✅️️
gt ❌️
ZZ

Missing something?

Make a request.

APIs

kindaVim writes the current environment information in a json file at ~/Library/Application\ Support/kindaVim/environment.json.

You can be notified of changes in the file with tools like watchman and directly read the environment state with tools like jq. With that information you could for example remap keys differently depending on kindaVim's Mode with tools like Hammerspoon or BetterTouchTool.

Sync your Preferences

Currently the Preferences are a plist file located at ~/Library/Preferences/mo.com.sleeplessmind.kindaVim.plist. You can add it to your dotfiles, or simply copy paste the file to your new computers.

P.S.: for security reasons Apple is now blocking the use of symlinks for App Preferences since macOS Ventura, so you cannot use anymore tools like Mackup to keep your Preferences synced. You can currently only paste and replace files manually.

Feedback

  • whether you need a missing move, want to report a bug or ask for a feature, just open an issue.

AccessibilityStrategyTestApp

Testing the Vim moves when using the macOS Accessibility requires building an external app. This app, as well as the tests of each move in the context of the Accessibility Strategy, are open source and available here: AccessibilityStrategyTestApp

Roadmap

  • adding new motions
  • adding new apps to The Wizard

Acknowledgments

Alternatives