Rubymotion completion with Emacs

May 06, 2012 | 9 Minute Read

Rubymotion is a great alternative for iOS apps development using ruby without XCode.

It comes with a nifty rake task for generate tags, wich are very useful for code completion when we are using our favorite editors.

Unfortunately the output file is for VIM, but you’re lucky because the fix for getting it work with Emacs is quick and easy.

All you have to do is add the line ‘-e’ at the end of the file /Library/RubyMotion/data/bridgesupport-ctags.cfg

That file contains the options passed to ctags command, -e is for output in emacs format.

Here is the gist just for reference:

Miscellaneous

Images

GitHub Logo
Format: Alt Text

Links

http://github.com - automatic!
GitHub

Blockquotes

As Kanye West said:





> We’re living the future so > the present is our past.

</div>

Code Examples in Markdown

  <p>Syntax highlighting with <a href="http://github.github.com/github-flavored-markdown/" title="GitHub Flavored Markdown" target="_blank">GFM</a></p>
  <pre>

“`javascript
function fancyAlert(arg) {
if(arg) {

$.facebox({div:'#foo'})

}
}
“`

</div>
<div class="col">
  <p>Or, indent your code 4 spaces</p>
  <pre>

Here is a Python code example
without syntax highlighting:

def foo:
  if not bar:
    return true</pre>
</div>
<div class="col">
  <p>Inline code for comments</p>
  <pre>

I think you should use an
<addr> element here instead.

</div>

<div class="ajax-error-message">
  <p><span class="icon"></span> Something went wrong with that request. Please try again. <a href="javascript:;" class="ajax-error-dismiss">Dismiss</a></p>
</div>

<div id="logo-popup">
  <h2>Looking for the GitHub logo?</h2>
  <ul>
    <li>
      <h4>GitHub Logo</h4>
      <a href="http://github-media-downloads.s3.amazonaws.com/GitHub_Logos.zip"><img alt="Github_logo" src="https://a248.e.akamai.net/assets.github.com/images/modules/about_page/github_logo.png?1334862345" /></a>
      <a href="http://github-media-downloads.s3.amazonaws.com/GitHub_Logos.zip" class="minibutton btn-download download"><span><span class="icon"></span>Download</span></a>
    </li>
    <li>
      <h4>The Octocat</h4>
      <a href="http://github-media-downloads.s3.amazonaws.com/Octocats.zip"><img alt="Octocat" src="https://a248.e.akamai.net/assets.github.com/images/modules/about_page/octocat.png?1334862345" /></a>
      <a href="http://github-media-downloads.s3.amazonaws.com/Octocats.zip" class="minibutton btn-download download"><span><span class="icon"></span>Download</span></a>
    </li>
  </ul>
</div>




<span id='server_response_time' data-time='0.02636' data-host='fe13'></span>



Try to execute

1
rake ctags

in your rubimotion project directory, and this time you should see a file named TAGS (in capital letters).

For completion in emacs just press M-.
The first time it should ask for TAGS file location.

Enjoy coding with ruby and may the church of Emacs bless you ;)