Questions tagged [filetype-ruby]
The filetype-ruby tag has no usage guidance.
23
questions
1
vote
0answers
22 views
Can't redefine tabstop, softtabstop and softwidth after syntax detection
I've a vim:
VIM - Vi IMproved 8.2 (2019 Dec 12, собрано Apr 8 2020 14:10:43)
and I tried to redefine tabstop, softtabstop and softwidth values for a file after detection of its syntax. I.e. I have a ...
0
votes
1answer
41 views
:Ctags command returns “E492: Not an editor command: Ctags” error
I have vim-rails plugin installed (it's definitely installed as evidenced by good output from :echo rails#app(). I have ctags installed with: brew install --with-jansson --HEAD universal-ctags/...
1
vote
1answer
248 views
neovim ruby/rails omnicomplete
I'm trying to get omnicomplete working in neovim (0.3.4) on debian 10 with Ruby 2.6.6 (rbenv).
I have these plugins:
Plug 'vim-ruby/vim-ruby' " ruby ...
2
votes
1answer
34 views
Rails Vim tab completition for model and controller works different than for views
I'm using Vim with Rails Vim plugin. When trying to tab-complete command :Emodel U or :Econtroller U and then <Tab> it won't recognize the user.rb or user_controller.rb file. But works fine for :...
2
votes
3answers
176 views
How to get tpope/vim-rails gf command to work with SpaceVim
I am using SpaceVim as Ruby on Rails IDE and installed the tpope/vim-rails plugin.
Commands such as :Econtroller, :Emodel and :find are working just fine, but the gf command provided by this plugin ...
2
votes
1answer
522 views
How do I configure the parameters that ALE sends to prettier for ruby?
Note: this is a neovim question, not stock vim
I have both rbprettier and prettier with the ruby plugin installed on my system. If I pipe a Ruby file into rbprettier, or if I pipe it into prettier --...
2
votes
0answers
325 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
588 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 ...
3
votes
0answers
342 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 ...
3
votes
1answer
6k 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
419 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
361 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
380 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
114 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 ...
3
votes
1answer
112 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
389 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
146 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
140 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
552 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
257 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
738 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
139 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