Yvim is a replacement for Xcode's built-in Vim Mode. It works using macOS accessibility APIs and does not require code injection. Although it's not there yet, the goal is to support more Vim commands than Xcode's built-in Vim Mode does.
-
Change the current line
cc
. -
Delete from the cursor up to the first opening bracket
dt(
. -
Yank three lines
y3y
. -
Change the word under the cursor
ciw
.
-
Insert text before
i
or after the cursora
. -
Undo the previous action
u
. -
Repeat the previous action
.
. -
Enter visual mode
v
.
-
Move the cursor one step
h
,l
,j
,k
. -
Jump to the beginning
0
or end$
of a line, or to the first non-space character^
. -
Find a character after the cursor
f
+{char}
, or move forward upto a charactert
+{char}
, or in reverseF
+{char}
,T
+{char}
. -
Perform any motion multiple steps at once
{n}
+{motion}
.
- Inner word without whitespaces
i
+w
.
- Make sure Xcode's built-in Vim Mode is disabled (Editor > Vim Mode).
- Launch Yvim.
- Give Yvim the "Accessibility" and "Input monitoring" permissions in System Preferences.
- Tip: Change to a block cursor style in Xcode in Preferences in the Themes tab.
Yvim does not affect any apps other than Xcode.
Yvim is tested to work on Xcode 15 and macOS Sonoma.