Vim tab completion for RubyMotion

by Amitava,

Here is a quick rundown on setting up tab completion in vim for RubyMotion.

Configure ctags support

Using ctags with vim can save us from typing really long class or method name by hand. RubyMotion already includes a rake task for generating ctags for a project, but first we need to ensure the proper ctags executable is installed in the system. ctags can be installed using a package manager. OSX users can inatall it using homebrew.

~> brew install ctags

Generate RubyMotion ctags file

After ctags is installed run the following rake task from inside the root of the RubyMotion project directory.

~> rake ctags

This will generate the ctags file that we will use in vim to setup tab completion.

Setup vim for tab completion

supertab is a vim plugin which allows you to use Tab for all your insert completion needs. Once installed there is no need to type those long class or method names anymore. Just type two or three characters and press Tab and it will use the ctags file to display a list of matching names.

vim tabcompletion for RubyMotion

More articles

Rails Inflections: The Magic Behind Singular and Plural Transformation

Learn how Rails Inflector handles singular and plural forms with customizable rules

Read more

Unleash the Power of Hotwire(Part 2): Getting Started with Stimulus

Learn the fundamentals of Stimulus, the lightweight JavaScript framework that complements Hotwire. Start with the basics and build your understanding step by step.

Read more

Ready to Build Something Amazing?

Codemancers can bring your vision to life and help you achieve your goals