Not signed in (Sign In)

Categories

Vanilla 1.1.1 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorlsv
    • CommentTimeJun 4th 2008 edited
     permalink
    Just got a little thought after have made a lot of replacing

    'x' => '\x',
    'y' => '\y',
    'z' => '\z',
    'xz' => '\xz'
    (and a lot more lines)

    In this case it would be very nice to have markers if you want the same letter on each side of the =>
    Try replace x with a, and y with b and z with c and so on... its terrible, so somekind of 2 markers would be very nice.
    I havent seen it at any programs yet, so maybe its not possible

    --
    Martin
    • CommentAuthordaryl
    • CommentTimeJun 4th 2008
     permalink

    Do you mean you have a file which looks like:
    'x' => '\x' 'y' => '\y' 'z' => '\z' ...
    and you want to replace each occurance of x with a, each y with b, each z with c, an so forth?

    If so you’d need a different search/replace with each.

    On the otherhand, if you mean you have:
    'x' 'y' 'z'
    and you want to change it to become:
    '\x' '\y' '\z'
    then you can use regular expressions:
    Search: ([a-z]) Replace: \\$1

    • CommentAuthorlsv
    • CommentTimeJun 5th 2008
     permalink
    Thats the first example I mean :-)
    - I cant see how an search/replace should work with this...

    And thats what I think some kind of 2 markers would be nice (of course only if you have the chars on the same position on each line)
    Fx. first marker at position 5 and the second marker on position 11, and when you press arrowleft, then the first marker will be on position 4 and the second on pos 10, and when you type anything then its inserts/replace on both markers (insert/replace can of course be turned by the insert key on the keyboard)

    Hope you'll understand the meaning :)

    --
    Martin
    • CommentAuthordaryl
    • CommentTimeJun 5th 2008
     permalink

    lsv: first marker at position 5 and the second marker on position 11, and when you press arrowleft, then the first marker will be on position 4 and the second on pos 10, and when you type anything then its inserts/replace on both markers

    You can multiselect stuff: ctrl+click various places then start typing and your text will appear in all the places you clicked. See also ctrl+selecting multiple words, lines, paragraphs, etc.

  1.  permalink

    This functionality is really a special one; usable in minimum cases. That’s why no editor has it, even if the implementation would be trivial (for the case where the markers are on the same line).

    However, to help you more, can you please just paste the real code and write a step by step of changing some value pairs? I think we are still a bit confused.