Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [filetype-ruby]

The tag has no usage guidance.

2
votes
0answers
28 views

Omni completion Pattern not found - Error loading rails environment

I'm trying to make Omni completion work with my Ruby files, but it only works with Ruby's core libraries; for instance, after typing String.<C-X><C-O> i get all Ruby's String methods, ...
0
votes
1answer
304 views

sheerun/vim-polyglot ruby seems cause enormous slow down, how to fix or better plugin to use?

When I open a ruby based file (.rb,.erb) in nvim, it causes my whole laptop to slow down! This seems to be caused by sheerun/vim-polyglot that I use for syntax highlighting, specifically the ruby ...
2
votes
0answers
170 views

Neovim takes so long to source ruby.vim [closed]

After noticing some lag that only happens when I use neovim to open Ruby files, I have debugged it and find the result quite interesting (from ms 255 to ms 1294): times in msec clock self+sourced ...
0
votes
1answer
2k views

Why files in `~/.config/nvim/after/ftplugin/` are not taken into acount?

My neovim doesn't load file type plugins when loading a ruby/eruby file. Here is the corresponding configuration files: for f in ~/.config/nvim/after/ftplugin/* ; do echo "# $f" ; cat $f; done # /...
0
votes
1answer
193 views

Inconsistent <cword>, <C-R><C-W>, and keyword behavior

I'm in a Ruby file, and because ! is not an iskeyword character, if I place the cursor on a call to mymethod! and attempt a tag lookup via C - ], Vim searches for mymethod (without the !). Adding ! to ...
2
votes
1answer
247 views

ruby syntax highlighting lost on long files

With a "long" ruby file (896 lines in my case) the ruby syntax highlighting is lost when I G to the bottom of the file. Once that happens and I go back to the top with gg, the syntax highlighting ...
0
votes
1answer
265 views

Ruby indentation: align multiline method chains on the leading dot?

Vim indents Ruby multiline method-chains like: object.read .write .rithmetic I'd like to make it align the dots instead: object.read .write .rithmetic I haven't been able to find a ...
0
votes
1answer
87 views

Does vim have functionality for completetion of methods/variables with punctuation?

In Ruby, and languages based on Ruby the style-guide recommends bool getter methods be named empty? as opposed to is_empty. Note the question mark. Vim however, does not complete the ? by default. Is ...
2
votes
0answers
51 views

Possible to use `!` in `iskeyword`, but only at the end of a word?

I regularly use Vim to write Ruby code, which allows ! as part of method identifiers and also uses it as logical negation. Currently, I configure iskeyword to include ! (using autocmd Filetype ruby ...
3
votes
1answer
215 views

How do I control how vim indents ruby blocks?

When I start a ruby block in the middle of a line, the next line is indented deeper than I'd like. It's indented from the start of the block, not the start of the line. Example: some_variable_name =...
0
votes
1answer
119 views

Control indenting of Ruby Comments

I use Vim to edit Ruby code, and the one issue that I keep having trouble with is the comment indenting. It seems that Vim really wants all # comment marks that begin a line to indent all the way to ...
0
votes
1answer
106 views

How to evaluate a ruby expression in a buffer

I believe that I once saw a plugin which allowed one to see the result of evaluating ruby expressions inside a buffer. Eg, if I wrote a line like 3 + 2 # => and pressed the required magic keys, ...
2
votes
2answers
2k views

Vim omnicomplete with Ruby 2.3.1

I've recently learned about Vim's omnicompletion and while attempting to make it work, I get the error Pattern not found. To test it I used the following code: class C def hello puts "Hello, ...
3
votes
1answer
311 views

Nested highlighting

In html eruby files, I would like to highlight the <% ... %> text in dark green only when it is inside double quotes. I.e. in in this example: I want it dark green instead of white. I know ...
2
votes
0answers
198 views

Enhancing Vim gf command for ruby: include module syntax

I am looking for a way to enhance vim gf command class Myclass include Mymodules::HardToFind end I have started with installing tpope/rails-vim: Easy navigation of the Rails directory structure....
4
votes
0answers
652 views

How to enable autocomplete for my rails functions

How can I add auto-complete for my Rails project? I want autocomplete for existing rails functions, including gems, and for functions I created. I hope there is some plugin for smart auto-complete, ...
2
votes
3answers
95 views

Plugin for on-the-fly # => evaluation

How can I evaluate Ruby code on-the-fly when you are writing it? This is what it looks like: 5 + 5 # => 10