2
votes
1answer
252 views

bash vi mode: What does # -*- mode: ruby -*- # vi: set ft=ruby : mean?

I'm looking through some random code, and at the top of it, it says this: # -*- mode: ruby -*- # vi: set ft=ruby : What does this mean? I know it's a simple question, but I couldn't find it out ...
0
votes
0answers
69 views

Cursor keys leave insert mode in irb in vi mode

I am using vi-mode in a ruby IRB by having a ~/.inputrc containing only the following line: set editing-mode vi Since I changed from ruby 1.8.7-p371 to ruby 1.9.3 and 2.0.0, IRB (and the rails ...
0
votes
2answers
136 views

How can I format Ruby arguments/hashes in Vim?

I'd like to be able to easily formatting Ruby code from within Vim. If I have a method with a hash argument foobar(foo: "FOO", bar: "BAR") How can I turn it into foobar( foo: "FOO", bar: ...
0
votes
2answers
57 views

How to install vimtrainer?

I'm trying to install vimtrainer. First I did: $ svn co https://vimtrainer.svn.sourceforge.net/svnroot/vimtrainer/trunk vimtrainer $ cd vimtrainer Then made sure ruby, rubygems, rake and vim with ...
2
votes
2answers
870 views

Building Vim with rbenv and Command-T on OSX

dyld: lazy symbol binding failed: Symbol not found: _rb_encdb_declare Referenced from: /Users/sa125/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin10.8.0/enc/encdb.bundle Expected in: flat ...
0
votes
1answer
456 views

Can I get vim to correctly indent this Ruby code (Nokogiri)?

The first XML Builder Example for Nokogiri looks like this: builder = Nokogiri::XML::Builder.new do |xml| xml.root { xml.products { xml.widget { xml.id_ "10" ...
4
votes
1answer
1k views

Vim */dyn support

What does mean the plus sign before */dyn in the :version command's output, e.g.: +python/dyn +python3/dyn +ruby/dyn +tcl/dyn I didn't find any useful documentation on it. When I run :echo ...
6
votes
2answers
1k views

Vim: “brace matching” for languages without braces? (Ruby, Python, etc)

Vim is great at highlighting matching braces. But lately I'm working in Ruby, where method definitions generally start with do and end with end instead of { and }. Similarly, if statements and case ...
1
vote
1answer
27 views

how to define what characters are considered to be part of a tagname in vim?

when I'm using Ctrl-] to jump to a tagname in vim it ignores ! and ? characters which can be used in ruby as parts of identifiers. i.e. when trying to jump to 'empty?' tag it complains about missing ...