some simple questions about RubyMine

Hey guys,

I'm a Ruby on Rails Developer comming from vim/cli to RubyMine and having some questions about customisability and some problems.
First of all, it seems as if the IdeaVIM Plugin is either not up to date or incompatible with RubyMine, as there are many shortcuts that doesnt work even though they are mentioned in the description of the plugin. Tab completion in command mode moves to the next frame and simple sequences like CTRL-R do unexpected things.

Another thing is the indention on case statements which should all align like this:

case
when 1
     #whatever
when 2
     #whatever
else
     #whatever
end

But else is always on indent. This applies to several other statements.
Can i somehow change this behaviour?

Another issue i have is the missing feature to enable "smart indent" for haml (or all filetypes).
It's annoying to press backspace two times to go back one indent.

Im also still in search for a possibility to view changes between two versions in git (not just a single file).

I really like the Model-Dependency-Diagram, but it doesn't display all my models. Right know i have a project
with 30models, having between 3 and 40 fields. - Just 5Models are displayed.

Apart from these things, i really like RubyMine and its features.

Hope someone can help me out with some of these things.

Thanks in advance
Florian

10 comments
Comment actions Permalink

Hi Florian,

I'm a Ruby on Rails Developer comming from vim/cli to RubyMine and having some questions about customisability and some problems.
First of all, it seems as if the IdeaVIM Plugin is either not up to date or incompatible with RubyMine, as there are many shortcuts that doesnt work even though they are mentioned in the description of the plugin. Tab completion in command mode moves to the next frame and simple sequences like CTRL-R do unexpected things.

Please ensure that you have configured RubyMine's keymap to use Vim keymap.

Another thing is the indention on case statements which should all align like this:

case
when 1
     #whatever
when 2
     #whatever
else
     #whatever
end

But else is always on indent. This applies to several other statements.
Can i somehow change this behaviour?

What RubyMine version do you use? I've tryed to reproduce this on 2.0.1. And everything worked fine. Have you tried an option File | Settings | Code Style | Ruby | Indent when cases?

Another issue i have is the missing feature to enable "smart indent" for haml (or all filetypes).
It's annoying to press backspace two times to go back one indent.

RubyMine doesn't have such a functionality yet, feel free to create a feature request.

Im also still in search for a possibility to view changes between two versions in git (not just a single file).

What do you mean? As far as I understood you want to see the whole diff between 2 commits?

I really like the Model-Dependency-Diagram, but it doesn't display all my models. Right know i have a project
with 30models, having between 3 and 40 fields. - Just 5Models are displayed.

Are all of them are ActiveRecord models?

Regards,
Oleg

0
Comment actions Permalink
Please ensure that you have configured RubyMine's keymap to use Vim keymap.

There is no option "vim" in the keymaps dialog within settings, i have only enabled vim key emulation.

What RubyMine version do you use? I've tryed to reproduce this on 2.0.1. And everything worked fine. Have you tried an option File | Settings | Code Style | Ruby | Indent when cases?

Im using RubyMine 2.0.1 on Windows XP. I have tried the settings, but they dont do what i want.

What do you mean? As far as I understood you want to see the whole diff between 2 commits?

Yea, im using gitk for this purpose right now.

Are all of them are ActiveRecord models?

Of course they are. It is actually a structure like follows:

model1 < ActiveRecord
model2 < ActiveRecord
model21 < model2
model22 < model2
...

The first five are displayed correctly, the other dont. There are no syntax error in these files.

Mfg

0
Comment actions Permalink

Hello Florian,

Please ensure that you have configured RubyMine's keymap to use Vim keymap.

There is no option "vim" in the keymaps dialog within settings, i have only enabled vim key emulation.

You have to install it manually from ideavim plugin see README.txt inside plugin for more details.
However we have an issue on this: http://youtrack.jetbrains.net/issue/IDEA-51505

What RubyMine version do you use? I've tryed to reproduce this on 2.0.1. And everything worked fine. Have you tried an option File | Settings | Code Style | Ruby | Indent when cases?

Im using RubyMine 2.0.1 on Windows XP. I have tried the settings, but they dont do what i want.

Could  you please describe desired behavour: text before and expected result?

Are all of them are ActiveRecord models?

Of course they are. It is actually a structure like follows:

model1 < ActiveRecord
model2 < ActiveRecord
model21 < model2
model22 < model2

I'll ask responsible developer to handle this.
Thanks a lot for your feedback.

Regards,
Oleg

0
Comment actions Permalink

I installed the plugin using the README.txt, but still shortcut CTRL-R for redoing an action, that i undo using u doest work, just to give an example.
The replace-window popping up, is fixed now, anyway.

Edit: i fixed it by removing the keybinding "reload sources" for the ruby console.

Some other things changed there meaning like :e, which is (in vim) used to reload the current file in the buffer. Is there somewhere a good ressource about
these differences? :help shows me an error of a missing txt file.

In Code Style > Ruby within config I unchecked the two boxes "keep line breaks" and "indent when cases". The preview looks broken now, even after restart.
When I now type: case @var<enter>when 1<enter>'a'<enter>when 2<enter>'b'<enter>else<enter>'c'<enter>end

it looks as follows:

     case @var
       when 1
       'a'
       when 2
       'b'
       else
       'c'
       end

but it should look like this:
               case @var
               when 1
                 'a'
               when 2
                 'b'
               else
                 'c'
               end

Another situation where auto indention is wrong is def<enter>end, which doesnt automatically outdent end:
               def
                    end

Is there somehow the possibility to move a file to another split using the keyboard? Not even drag&drop seems to
work for this. I always have to close the file, move to the other split and then open it again. I also can't find an easy
way to switch between two or more splits with a single keystroke. Strg-Tab shows a list of all opened files and the
panels, which seems odd, since all of them are already accessible by other keys like alt-1, etc. or alt-left/alt-right.

Maybe I missed something in the keymaps dialog for this.

If these minor bugs get fixed, I will get a licence soon. Thank you for developing such a great IDE.

Florian

0
Comment actions Permalink

Hello Florian,

I installed the plugin using the README.txt, but still shortcut CTRL-R for redoing an action, that i undo using u doest work, just to give an example.
The replace-window popping up, is fixed now, anyway.

Edit: i fixed it by removing the keybinding "reload sources" for the ruby console.

Some other things changed there meaning like :e, which is (in vim) used to reload the current file in the buffer. Is there somewhere a good ressource about
these differences? :help shows me an error of a missing txt file.

We are going to maintain ideaVim plugin on our own, but now the main document to read is README.txt file.
Also we have several issues on vim support in our tracker: http://youtrack.jetbrains.net/issues?q=tag:+vim

Indeed such formatting on Enter key doesn't work, I've created an issue on this: http://youtrack.jetbrains.net/issue/RUBY-5749

Is there somehow the possibility to move a file to another split using the keyboard? Not even drag&drop seems to
work for this. I always have to close the file, move to the other split and then open it again. I also can't find an easy
way to switch between two or more splits with a single keystroke. Strg-Tab shows a list of all opened files and the
panels, which seems odd, since all of them are already accessible by other keys like alt-1, etc. or alt-left/alt-right.

Maybe I missed something in the keymaps dialog for this.

As far as I know moving and navigation between tabs in different split windows requires mouse.

Regards,
Oleg

0
Comment actions Permalink

By the time moving by, i found other issues/features i miss.
Issues:

Column/Block select doesnt work with mouse (right click which was intended for this by vim is used differently
and left click clears the context; i even tried shift/strg+leftclick, but this doesnt work either).

Folds in yml files arent created from indention, but from syntax, which is technically wrong and can be confusing,
if u use attributes without a value.

To come back to the split movement: i think there was a design change in recent versions, where someone forgot
that feature since in window>Goto Next Splitter and window>Goto Previous Splitter there is the feature i missed bound
to strg-tab/strg-shift-tab. But this is bound to the overall window switcher as well. By rebinding it to other keys, it just works as
expected.
Still there is the "moving tabs to another split"-issue.

Features:

There seems to be no autoindention within haml files, but it can always be determined pretty easy:
a.) if there is a do expression or a do |whatever| at the end of an "-", than there has to be an indent
b.) if there is a % or . or # expression that was not ended by a / or a text element, there has to be an indent
c.) if there was a : Expression, the next line has to be indented

Another feature i miss, is the possibility to convert tabs to spaces or just interpret every space as indents (tabs) for
every filetype, including plain txt files. This feature should be independent of filetype.

There is a feature located at settings>editor>smart keys within section "enter" that creates a matching }, there should also be an
entry for "def/end", too.

There should be a possibility to insert a color into SASS/CSS Files before putting in some other color. Like Code>Insert Color or something.

SASS needs autoindention and codecompletion.

-------

When can i expect the next release of RubyMine? Are there any Beta-Testings?

0
Comment actions Permalink

Hi,

Column/Block select doesnt work with mouse (right click which was intended for this by vim is used differently
and left click clears the context; i even tried shift/strg+leftclick, but this doesnt work either).

This behavour is not supported by vim plugin yet, please check option Right click | Column mode and you'll be able to use mouse for column mode selection.

Folds in yml files arent created from indention, but from syntax, which is technically wrong and can be confusing,
if u use attributes without a value.

Actually the are, could you please provide an example where it is not?

There seems to be no autoindention within haml files, but it can always be determined pretty easy:
a.) if there is a do expression or a do |whatever| at the end of an "-", than there has to be an indent
b.) if there is a % or . or # expression that was not ended by a / or a text element, there has to be an indent
c.) if there was a : Expression, the next line has to be indented

Sounds good, I've created an issue on this: http://youtrack.jetbrains.net/issue/RUBY-5768

There is a feature located at settings>editor>smart keys within section "enter" that creates a matching }, there should also be an
entry for "def/end", too.

This functionality is supposed to work now, missing end should be inserted automatically. Please provide an example.

There should be a possibility to insert a color into SASS/CSS Files before putting in some other color. Like Code>Insert Color or something.

SASS needs autoindention and codecompletion.

We are going to improve SASS support in further versions, please check out development roadmap: http://confluence.jetbrains.net/display/RUBYDEV/Development+Roadmap

When can i expect the next release of RubyMine? Are there any Beta-Testings?

We are going to release 2.0.2 bug fix release soon. We'll launch Early Access Preview for RubyMine next version, but we don't have any specific date yet.

Regards,
Oleg

0
Comment actions Permalink

Hi,

This behavour is not supported by vim plugin yet, please check option +Right click | Column mode+ and you'll be able to use mouse for column mode selection.


I'm currently using left-click select and then press either ctrl-v or shift-v in order to get the indended behaviour. To me this seems to be the easiest workaround.

> Folds in yml files arent created from indention, but from syntax, which is technically wrong and can be confusing,
> if u use attributes without a value.
Actually the are, could you please provide an example where it is not?


I'm actually just taking the automatically generated database.yml with mysql-database selected, where password is empty. This opens up a one-liner fold.

> There is a feature located at settings>editor>smart keys within section "enter" that creates a matching }, there should also be an
> entry for "def/end", too.
This functionality is supposed to work now, missing end should be inserted automatically. Please provide an example.


Well, it is handled through live templates if i press def<tab>, but i just tested def<space> which resulted in a missing end.

Still there is the "reverse-indent"/outdent feature missing in Ruby, that one can find for e.g. for CSS:
- end is always aligned to the corresponding "def, do, begin, for, if, unless, while", if there is nothing else than whitespace before end
   (this is triggered just after the keysequence "end" was entered)
- when is always aligned to the corresponding case, if the options "Indent when cases" is not checked.
- else is always aligned to the corresponding match of if, unless, case
- same happens to be the case with begin, rescue, ensure
There might be something missing.
A pretty easy workaround would be invoking ctrl-alt-i (auto indent lines) on the current line, whenever one of the tokens above(end,else,elsif,when,rescue,ensure) is entered.

There is another situation, where autoindent behaves different to the specifications:
When entering "{<enter>" at the end of a line, there is a double indent in the next line. Why?
There is always a single indent intended, both for Hashes and inline code with one exception:
If there is something else than whitespace or |<whatever>| following "{", then there has to be a double indent.

> There should be a possibility to insert a color into SASS/CSS Files before putting in some other color. Like Code>Insert Color or something.
>  
> SASS needs autoindention and codecompletion.
We are going to improve SASS support in further versions, please check out development roadmap: http://confluence.jetbrains.net/display/RUBYDEV/Development+Roadmap


That's great to see. I'm looking forward to this.


Where do i find more about "Script manager (to ensure RubyMine can be customized with Ruby scripts, no Java or XML)", that is mentioned in the roadmap? How deep
can such scripting go? Is it similar to mozilla framework or is it just some minor extending of autocompletion/keyhandling/etc.?

Florian

0
Comment actions Permalink

Hi,

> Folds in yml files arent created from indention, but from syntax, which is technically wrong and can be confusing,
> if u use attributes without a value.
Actually the are, could you please provide an example where it is not?


I'm actually just taking the automatically generated database.yml with mysql-database selected, where password is empty. This opens up a one-liner fold.

I've created an issue: http://youtrack.jetbrains.net/issue/RUBY-5771

Where do i find more about "Script manager (to ensure RubyMine can be customized with Ruby scripts, no Java or XML)", that is mentioned in the roadmap? How deep
can such scripting go? Is it similar to mozilla framework or is it just some minor extending of autocompletion/keyhandling/etc.?

Please refer http://www.jetbrains.net/devnet/docs/DOC-1161 for more details.

Regards,
Oleg

0
Comment actions Permalink

Please refer to the changes in my last post:

Still there is the "reverse-indent"/outdent feature missing in Ruby, that one can find e.g. for CSS:
- end is always aligned to the corresponding "def, do, begin, for, if, unless, while", if there is nothing else than whitespace before end
   (this is triggered just after the keysequence "end" was entered)
- when is always aligned to the corresponding case, if the options "Indent when cases" is not checked.
- else is always aligned to the corresponding match of if, unless, case
- same happens to be the case with begin, rescue, ensure
There might be something missing.
A pretty easy workaround would be invoking ctrl-alt-i (auto indent lines) on the current line, whenever one of the tokens above(end,else,elsif,when,rescue,ensure) is entered.


This should be added to http://youtrack.jetbrains.net/issue/RUBY-5749.

There is another situation, where autoindent behaves different to the specifications:
When entering "{<enter>" at the end of a line, there is a double indent in the next line. Why?
There is always a single indent intended, both for Hashes and inline code with one exception:
If there is something else than whitespace or |<variable-list>| following "{", then there has to be a double indent.


I think developers assumed, that { was always used in single line expressions. Which might apply to most cases - still it is technically wrong.

Florian

0

Please sign in to leave a comment.