Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Vim instead of (or with) Xcode for iOS development

Tags:

vim

xcode

ios

Xcode comes with a lot of things that are essential to building to the iPhone and/or iPad. In fact a lot of it I am not even aware of because it is so 'behind the scenes'.

On the other hand, I have recently been exposed to the advantages of using Vim as an editor. Is there any setup which would make using Vim an efficient option when developing for the iOS platforms? Or would it be so complicated to combine the two as to make this question moot?

In other words, if you have any tips, advice or warnings when using Vim and Xcode together, I am all ears!

like image 344
Eric Brotto Avatar asked Jul 17 '12 09:07

Eric Brotto


People also ask

Can you develop for iOS without Xcode?

Non-native platforms, like Flutter or React Native, won't make iOS builds without Mac either. Storyboards can be edited only in Xcode, so development without Xcode means development without Storyboards. Alternative IDEs for iOS development require Xcode. You don't need to run it, but you should have it installed.

Is Xcode good for iOS development?

Even for beginner developers, Xcode is the best choice for iOS app development. It has a source code checker that will highlight any errors while you are typing, and then give suggestions on how to fix the errors. Xcode also has templates and stored snippets of code to make development much smoother.

Can I use Linux for iOS development?

While iOS apps are extremely popular, they can be developed on other platforms like Linux or Windows as well. Due to their open-source features, Linux versions are popular in app development. The best thing is that you can work on iOS development on Linux by using the right tools.


2 Answers

Developing for iOS or Mac with Vim can be really powerful and fast, especially if you use TDD or want quick feedback.

But it takes a bit of finagling to get it working. The few important things you need to know are:

  • Use the xcodebuild command-line tool to run your build and units from some vimscript.
  • Use the clang_complete plugin to give you full code completion from within vim.
  • Use the ios.vim and cocoa.vim plugins for navigation.

This is my preferred method of working. In fact, I wrote the ios.vim plugin to make this easier for more people.

like image 112
eraserhd Avatar answered Sep 19 '22 16:09

eraserhd


I've been there already...

I love vim and regularly use it in my day-by-day C++ development on *nix platforms, but I also like all of Xcode's features which, specially with latest Xcode >= 4.3 and clang backend, give a real plus in terms of auto-completion and symbol referencing.

I think I've found the optimal solution with the great (although not officially supported by Apple) XVim plugin.

Hoping that future Xcode upgrades won't break it (it's still working fine with latest developers' previews of 4.5), this really allows you to keep your fingers moving as you've learned doing in Vim while working with Xcode, which as I said, is for me the optimal solution.

like image 20
abigagli Avatar answered Sep 18 '22 16:09

abigagli