Skip to content

rensbreur/Yvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Demo

Example commands

  • 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.

Simple operations

  • Insert text before i or after the cursor a.

  • Undo the previous action u.

  • Repeat the previous action ..

  • Enter visual mode v.

Motions

  • 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 character t + {char}, or in reverse F + {char}, T + {char}.

  • Perform any motion multiple steps at once {n} + {motion}.

Text objects

  • Inner word without whitespaces i + w.

How to run

  • 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.

Compatibility

Yvim is tested to work on Xcode 15 and macOS Sonoma.

About

Xcode Vim Mode Replacement

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages