Surround Selection

Hi

Using RubyMine 784

Some small observations regarding the new surround selection featire:

  1. BUG: Clicking on # to create "...#{some stuff}" will not work if "...some stuff" is at the end of a string.
  2. It would be nice if surround selection would toggle. As in click to surround, click again to unsurround.


I'm being totally nit picky. RubyMine is way sweet.
J

5 comments
Comment actions Permalink

Hello Jazel,

BUG: Clicking on # to create "...#{some stuff}" will not work if "...some stuff" is at the end of a string.

    Thanks for this, I've filled an issue: http://www.jetbrains.net/jira/browse/RUBY-3432.
    UPD: fix will be available in coming EAP build.

    It would be nice if surround selection would toggle. As in click to surround, click again to unsurround.

    What kind of behavour are you expecting? When you have selected part of text inside and press # it's quite clear which part of the text you want to wrap as expression subtitution.
    And If you are talking about toggle: It's not so obvious. There are several variants: whether you should select all the subtituition or just place caret someway inside it.
    However you can easily rollback this change by pressing Ctrl+Z.

    Thanks,
    Oleg

    Message was edited by: Oleg Shpynov

    0
    Comment actions Permalink

    Hi

    What kind of behavour are you expecting? When you have selected part of text inside and press # it's quite clear which part of the text you want to wrap as expression subtitution.

    And If you are talking about toggle: It's not so obvious. There are several variants: whether you should select all the subtituition or just place caret someway inside i
    However you can easily rollback this change by pressing Ctrl+Z

    I was thinking that if you selected a bit of code, clicked say [ to wrap it with [],  the code stayed selected so that You could click { to change the [] into {} because you changed your mind. I'm not sure if this would be more convenient than what you currently have, probably not since Ctrl+Z reselects your code anyway.

    Thank You
    Jacek

    0
    Comment actions Permalink

    Hello Jacek,

    I was thinking that if you selected a bit of code, clicked say [ to wrap it with [],  the code stayed selected so that You could click { to change the [] into {} because you changed your mind.

    Will be available in coming EAP.

    Regards,
    Oleg

    0
    Comment actions Permalink
    I was thinking that if you selected a bit of code, clicked say [ to wrap it with [],  the code stayed selected so that You could click { to change the [] into {} because you changed your mind.

    Will be available in coming EAP.


    I talked about this with a friend. He mentioned the ability to toggle between single and double quotes for example. Lets say you had a single quoted string, selected the whole thing and hit " it would replace the single quotes with double and stayed selected so You could toggle it back. Anyway, small things. Thank You.

    Jacek

    0
    Comment actions Permalink

    Hello Jacek,

    I talked about this with a friend. He mentioned the ability to toggle between single and double quotes for example. Lets say you had a single quoted string, selected the whole thing and hit " it would replace the single quotes with double and stayed selected so You could toggle it back. Anyway, small things. Thank You.

    Exactly the same functionality you've described was implemented in our new beta release of RubyMine available at www.jetbrains.com/ruby.
    You can select whole single quote string, press " and it will be replaced with double quote with the same selection, then you can press single quote and it will be replaced again. No more extra selection activities required. Also works with parentheses.

    Thanks,
    Oleg

    0

    Please sign in to leave a comment.