Xcode Full Vim Support

Hi everyone!

I've been using various IDEs over the years for different projects I work on, and one thing I have always been able to rely on is full or at least powerful integration with Vim keybindings. Of course I can survive going back to using my mouse and keybinds I prefer only using when off the clock, but I think as a mature and modern IDE, despite clashes with existing keybinds, there should be a better effort to give full Vim keybinds support. I know that for developers who don't buy into spending a ridiculous amount of time to possibly edit code faster, if you learn Vim right, they don't see this as an issue. But for someone who has opened Eclipse, Rstudio, Google Cloud, Jupyter lab, good ol' Vim itself, Overleaf notebook, and basically any text editor for programming, to have full access to Vim keybindings, it feels quite frustrating that not even Visual block mode is mapped properly in Xcode with Vim keybindings.

Would it be possible for better support for Vim keybindings, even being able to edit text with regex using classic Vim command-line mode ":". I know it will not be possible to implement everything, but at least implementing enough for me to not notice that Vim is clearly not supported would be amazing. Thanks everyone 😘😘

Answered by arhowe00 in 715762022

I also think that adding better Vim support in Xcode would be a good segue for making the editor more useable on mobile devices, if Xcode was ever thought about on the iPad. Not because the default user knows how to use it, but I can tell you that tapping on the screen will surely be a turn off for mobile developers. If I can use Vim in Xcode on the iPad, I'll be a force to be reckoned with. All I'll need my fingers is to build and run code and maybe to switch window panes.

Accepted Answer

I also think that adding better Vim support in Xcode would be a good segue for making the editor more useable on mobile devices, if Xcode was ever thought about on the iPad. Not because the default user knows how to use it, but I can tell you that tapping on the screen will surely be a turn off for mobile developers. If I can use Vim in Xcode on the iPad, I'll be a force to be reckoned with. All I'll need my fingers is to build and run code and maybe to switch window panes.

I was extremely disappointed to see that there were literally 0 mentions of vim in the Xcode 14 Beta 1 or 2 release notes. Can we at least get the dot operator apple?

Xcode vim mode got me really excited when I discovered, but it is just missing a few commands that I depend on:

  • . (repeat, this is crucial)
  • Ctrl+v (column/vertical select), and Shift+I (insert in all lines of a vertical select)

And to a lesser degree I also use these often:

  • Ctrl+a, Ctrl+x (increment, decrement)
  • :w (save because it's annoying to mentally switch between to Cmd+s)
  • :%s/<find_exp>/<replace_str>/g

After mourning the death of AppCode and XVim, and being highly frustrated with Xcode 13's Vim mode, I started working on a very different approach: a macOS app integrating Neovim in Xcode. The first version is promising and I'm already using it for my daily work.

Come check it out: ShadowVim

Highlights

  • This is not a Vim emulation, but real Neovim with macros, ., Ex commands, etc.
  • Vim plugins (without UI) work out of the box. Hello vim-surroundargtextobj.vim and whatnot.
  • Add key mappings to trigger native Xcode features from Neovim (e.g. "Jump to Definition" on gd).

I switch between Android Studio (eclipse-based) and Xcode all of the time. And I have hated using xcode ever since the XVIM support went away. The native Xcode support for vi is a joke!

ShadowVim sounds fantastic, but I am intimidated by what I see on github. There are a lot of technical details, but I don't see a simple overview. How do I get ShadowVim up-and-running? Is there a document like "Installing ShadowVim for dummies"

I have been using vi/vim for 40 years, but I am not a guru. If I just had "." and a small subset of ":", I would be very happy.

THANK YOU for your hard work!!

@openingapps Just download the latest version from https://github.com/mickael-menu/ShadowVim/releases, run the ShadowVim.app file and you're good to go. The details on the repo are for customizing the configuration.

Xcode Full Vim Support
 
 
Q