All Questions

Tagged with
Filter by
Sorted by
Tagged with
132 votes
27 answers
100k views

macOS Mojave 'ruby/config.h' file not found

When I try to build vim(8.1.0509) with ruby support(--enable-rubyinterp) on macOS Mojave(10.14.1) I get error: In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/...
maksimr's user avatar
  • 5,209
113 votes
13 answers
60k views

Installing vim with ruby support (+ruby)

I'm trying to get command-t installed for vim but my current version of vim doesn't have the (+ruby) flag. The command "which ruby" shows that ruby is installed. What do I need to do in order to ...
Chris Greer's user avatar
  • 1,131
61 votes
10 answers
16k views

Vim Command-T plugin error: could not load the C extension

I'm trying to install the Command-T plugin. I compiled vim following the instructions in this comment: Installing vim with ruby support (+ruby) So now there's the +ruby flag, but still when I try to ...
Carlo's user avatar
  • 4,096
44 votes
7 answers
12k views

Vim slow with ruby syntax highlighting

I've been using vim over ssh to work for a week or two now and all has been going great. Today I decided to add in some syntax highlighting, autocomplete, and some other general plugins. Set up vundle ...
ScottO's user avatar
  • 1,573
44 votes
8 answers
19k views

How does one navigate Ruby methods in VIM?

I'm learning VIM for Rails development and would like to easily navigate methods in a file. So far I see several options: Find 'def' by using /def<space> Create a macro that corresponds to a ...
btelles's user avatar
  • 5,400
38 votes
4 answers
11k views

How do I insert ERB-tags with Vim?

How do I insert <% %> in Vim? I have rails.vim.
jriff's user avatar
  • 1,957
32 votes
6 answers
13k views

vim ruby mismatch on Mac High Sierra

I recently upgraded my Mac to High Sierra After the upgrade, Macvim (mvim) stopped working because (I assume) HighSierra upgraded ruby to 2.3, and mvim is using ruby 2.0. Following is the error I am ...
user2960993's user avatar
32 votes
4 answers
7k views

Vim: Highlight keyword pairs in Ruby (def/end, do/end, etc)

In one of the Eclipse-based editors that I tried out recently (I think it was RubyMine), when a Ruby keyword that either opened or closed a method or block was selected, the corresponding open/close ...
pakeha's user avatar
  • 2,490
28 votes
8 answers
13k views

Format Ruby code in Vim

Just moving over to Vim at the moment. In TextMate I could format code by hitting Cmd-Alt-[. How do I achieve the same in Vim? See the answer below for the command. I found I also needed the ...
opsb's user avatar
  • 29.8k
28 votes
2 answers
12k views

Install Ruby support for VIM on Mac OS X

Mac OS X 10.6 (Snow Leopard) has VIM pre-installed (version 7.2), which is great. It also has Ruby pre-installed (version 1.8.7) which is great too. However, I want Ruby autocompletion in VIM. ...
JoHaan's user avatar
  • 283
20 votes
5 answers
7k views

Do you know an alternative ctags generator for Ruby

Exumerant Ctags does not work well with Ruby, you can see there are many hacks in the ruby.c code and basically it fails recognizing many cases. One of the most important is this bit: class ...
lzap's user avatar
  • 16.9k
20 votes
2 answers
5k views

How do I fix this annoying syntastic rails error

I have the following code in rails <% @post.errors.full_messages.each do |msg| %> ...
CodeCrack's user avatar
  • 5,303
20 votes
3 answers
3k views

vi input mode in command line Matlab?

I have these lines in my ~/.inputrc: set editing-mode vi set keymap vi This allows me to use vi keybindings in every program that uses GNU readlines for text input. Examples: python, irb, sftp, ...
Benjamin Oakes's user avatar
16 votes
4 answers
6k views

Vim and Ruby - matching "do"s and "end"s?

I'm sure we're all familiar with the "unexpected kEnd" problem. They are always (to me) a lot of trouble to track down, because Vim doesn't match "do"s and "end"s. (And, obviously, other elements that ...
GlyphGryph's user avatar
  • 4,774
16 votes
2 answers
5k views

How to jump from do to end of a Ruby block using Vim?

I'm using vim for ruby, php and perl development. There is the shortcut % to jump from the begin of a block (subroutine/function/method/if) to the end and vice versa. For me a % on a do/end tag in ...
gustavgans's user avatar
  • 5,161
16 votes
1 answer
549 views

Hacking rails.vim to work with Padrino

I recently cloned rails.vim (vim-rails) hoping to modify it to work with Padrino projects. Currently I'm trying to get the Rcontroller command to look not only in app/controllers (perfect for rails) ...
gcahill's user avatar
  • 3,155
15 votes
3 answers
2k views

(Mac)Vim quite slow when syntax is set to Ruby

I'm on MacVim 7.4 (I use the command line version), installed via Homebrew. Vim is slow when syntax highlighting Ruby code. htop shows a 80%-100% CPU usage when moving inside a Ruby file in vim. I ...
whatyouhide's user avatar
  • 16.4k
14 votes
6 answers
12k views

Ruby syntax checking in vim

I use vim with various plugins for editing ruby code. I have proper syntax highlighting set up but I was wondering if anyone knew of a way to get ruby syntax checking, similar to what you might see ...
roydq's user avatar
  • 312
14 votes
5 answers
4k views

What does the "g" stand for in Ruby's "gsub" and in Vim's substitution command?

Both Ruby and Vim use "g" with substitution commands to mean "all occurrences." What does the "g" stand for? Specifically, in Ruby, the String class has two "sub" commands: sub will replace only the ...
Nathan Long's user avatar
13 votes
6 answers
4k views

Regenerate ctags in vim using RVM

I have the following code in my .vimrc: map <Leader>rt :!ctags --extra=+f -R *<CR><CR> This generates ctags for my current directory. I'm using RVM, I'm working on different ...
astropanic's user avatar
  • 10.9k
13 votes
4 answers
14k views

How to Autoindent Ruby source code in Vim

suppose I have set cindent in .vimrc def func() followed by Enter, and then type end, it is indented(not aligned to the def) How to reindent the end keyword(align it to the def). Even using ...
user815693's user avatar
13 votes
4 answers
4k views

VIM Blockwise Insert

I would like to insert a hash at the beginning of a selected block of text in VIM (ruby comment). I selected the lines in Visual Mode, but how do I perform the same operation to all lines?
tesserakt's user avatar
  • 3,271
12 votes
5 answers
5k views

Automatic ruby folding in vim

Is there a way that I can setup vim to automatically fold ruby source files, but only fold at the method level regardless of the level that they are defined? So it will fold when I have: class ...
adivasile's user avatar
  • 2,427
12 votes
6 answers
5k views

Problem with Vim's Ruby plugin

I have just installed Vim and when ever I go to open in ruby file I get these errors: Error detected while processing C:\Program files (x86)\Vim\vimfiles\ftplugin\ruby.vim line: 76 Encoding::...
Alex's user avatar
  • 121
12 votes
2 answers
12k views

Vim syntax highlighting for ruby 1.9

Ruby 1.9 has a few new syntax elements, such as the {key: value} hash literal syntax. Has anyone written or seen an updated syntax/ruby.vim highlighting file that will highlight key: just like it ...
Peter's user avatar
  • 130k
12 votes
4 answers
3k views

What components make VIM a good (great) ruby editor?

I'm learning ruby on rails on a linux box and dusting off my VIM skills (skillz?). When I got started on VIM way back in my c++ days, I had a friend with a great vimfiles folder that had tons of ...
Alan Jackson's user avatar
  • 6,461
11 votes
7 answers
6k views

How to use correct ruby in vim ? How to modify $PATH in VIM?

I use plain Vim with ruby support on Lion (installed by gist). I am using ruby with rbenv so my path looks like /users/me/.rbenv/shims:..... From within vim the path is :!echo $PATH > usr/bin:/...
fbehrens's user avatar
  • 6,345
11 votes
5 answers
5k views

Why am I getting a popup message when I hover on any word of a Ruby file?

If I hover the mouse on any word of a Ruby file, I get a tooltip message. A screenshot of that popup message is at popup message. cat ~/.gvimrc returns: function! SyntaxBalloon() let synID = ...
cola's user avatar
  • 12.3k
11 votes
4 answers
2k views

Using vim, is there a command to have pasted text automatically line-wrapped?

CONTEXT: Part of a job I'm doing involves pasting paragraphs of text from a word doc into a ruby file. PROBLEM: These paragraphs are getting pasted in as a single very long line of text and I have to ...
steve_gallagher's user avatar
11 votes
6 answers
5k views

Running ruby code from vim

Is it possible after editing a ruby program in Vim to run it while still in the editor, not using the command line?
Sergey's user avatar
  • 11.7k
10 votes
3 answers
923 views

How do I configure vim to set softtabs conditionally?

I am now a Python/Ruby polyglot and have a need to switch out values in my .vimrc depending on the filetype I'm using. I need tabstop=2, softtabstop=2 for Ruby and tabstop=4, softtabstop=4 for Python....
deathweasel's user avatar
10 votes
2 answers
826 views

Rails won't exit on first CTRL-C

No Rails command will exit on the first CTRL-C. So rails s or rails c require me to hit control CTRL-C a second time and commands that previously wouldn't have required a CTRL-C at all such as rake ...
zach's user avatar
  • 319
10 votes
3 answers
15k views

Better autocomplete in VIM

All, I have been working with vim for some time now, and love everything about it - there is only one thing I really miss from IDEs like RubyMine, and that is advanced autocompletion. For reference, ...
Warren Wright's user avatar
10 votes
3 answers
885 views

Internal ruby error in vim

I've been having this problem for a while with vim. The first time I do anything that interacts with ruby, such as :ruby puts "test", I get <internal:gem_prelude>:1:in 'require': cannot load ...
Marcus Buffett's user avatar
10 votes
1 answer
281 views

How to address python code-browsing and code-completion issues in vim? [closed]

I'm working on a large python project using vim with tagexplorer, pythoncomplete, and ctags. Tag-based code-browsing and code-completion features don't work the way they should unfortunately because ...
Mario Aguilera's user avatar
9 votes
6 answers
6k views

Execute Code in VIM similar to Cmd+R in Textmate or Cmd+B Sublime Text2

Hey is there a way or plugin to execute Code e.g. Ruby in my case, directly from my vim editor. I know this from Textmate, where you can execute Code with Cmd+R or Cmd+B in Sublime Text2. In Sublime ...
daniel's user avatar
  • 3,105
9 votes
2 answers
1k views

do ruby plugins make starting vim very slow?

Lately vim takes a long time to start up when I'm running it to edit a ruby file or a rails project. But it starts up fast when invoked on a plain text file. Is there any way to find out which ruby ...
dan's user avatar
  • 44.7k
9 votes
3 answers
3k views

How do I specify that I want Vim to treat .ru files like .rb files

Whenever I use Vim with Ruby files, I get nice coloring and automatic indention on blocks. However, when I am editing a Rack file, I don't get these things. How can I extend my Vim/Ruby configuration ...
Jimmy Lyke's user avatar
9 votes
1 answer
2k views

like-vim emacs ruby indentation

ruby-mode from svn, looks equal to 1.1 version here is emacs indentation of hash User.all({ :joins => :account, :conditions => {:delete_at => nil} }) here is the same in ...
edbond's user avatar
  • 3,941
9 votes
4 answers
2k views

Ruby refactoring in Vim

I'm a big fan of Resharper in Visual Studio. It has some awesome refactoring tools, similar to what you get in Eclipse for Java. Is there anything like this for Ruby? Better yet, is there a plugin ...
fregas's user avatar
  • 3,232
9 votes
2 answers
3k views

How to automatically append "end" to ruby code blocks in vim?

This is a feature I miss from Textmate. When you type out a def, if, block, etc. and hit enter, the editor automatically appends "end" to the code block and puts the cursor in between. How do I set ...
widgetycrank's user avatar
9 votes
2 answers
2k views

How to change vim ruby version

I am a noob to vim and am wanting to use the command-t plugin, got really used to that in atom. I have done everything in the github repo but am unable to follow how to change the version of ruby that ...
Int'l Man Of Coding Mystery's user avatar
9 votes
2 answers
1k views

Vim taking really long time to open Ruby files

I've noticed that Vim is taking a really long time to open Ruby and ERB (Embedded Ruby) files. I profiled my startup time and these the interesting lines (the full profile is at the bottom if you want ...
David Tuite's user avatar
  • 22.4k
9 votes
1 answer
8k views

Vim details autocomplete for Rails

I found nice detail autocomplete for python Is there analog with description of methods for Ruby on Rails?
Vyacheslav Loginov's user avatar
9 votes
6 answers
4k views

How do I override the default tabindent for Ruby in Vim?

I'm using Janus for vim and am really liking it, but I can't seem to get my preferred tabstop of 4 working right. This is in my .vimrc set tabstop=4 set shiftwidth=4 set softtabstop=4 set expandtab ...
swilliams's user avatar
  • 48.5k
9 votes
5 answers
6k views

tips and tricks for using vim with ruby/ruby on rails

I'm one of those developers who isn't using TextMate with any of his Ruby/Ruby on Rails work. My particular loyalty in this arena lies with vim. What are your favorite tips/tricks for using vim with ...
randombits's user avatar
  • 47.8k
9 votes
2 answers
2k views

Is there any way to set up good autocompletion for Ruby in Vim?

I've been trying to set up Vim autocompletion for Ruby code and have not been successful. I mean things "work", but I would expect a better plugin or configuration to be available. I've set up the ...
bluediapente's user avatar
  • 3,956
8 votes
3 answers
6k views

Adding VIM plugins to Janus setup

I recently switched over to using Janus from a custom set of vim plugins and .vimrc. I'm really enjoying the setup, but one thing I'm missing is the automatic completion of blocks in Ruby. For ...
Peter Brown's user avatar
  • 51.4k
8 votes
1 answer
7k views

"dyld: Library not loaded", "libruby.1.9.1.dylib" when calling "mvim ." in the command line

I'm trying to open my rails project into mvim (macvim) using "mvim ." but I get the following error. ➜ cs193p git:(master) mvim . dyld: Library not loaded: /Users/myusername/.rvm/rubies/ruby-1.9.3-...
AdamT's user avatar
  • 6,475
8 votes
1 answer
2k views

Full screen terminal application with ruby (or other languages)

Have you ever used cli tools like vim or htop? All these will maximize inside the terminal and have no scrollback but when you exit, they disappear and you can see what you typed in before. Example: (...
x3ro's user avatar
  • 328

1
2 3 4 5
7