Menu

TextFX Suggestion

2007-06-01
2012-11-14
  • Nobody/Anonymous

    Hello,

    I thought it could be cool if the following feature could be added to TextFX. I would love to be able to switch assignations quickly. For instance, with such a code :

    mytable[1] = var1
    mytable[2] = var2
    mytable[3] = var3

    I would love to have a functionality that changes the code to :

    var1 = mytable[1]
    var2 = mytable[2]
    var3 = mytable[3]

    A simple switch from whatever is on each side of the equal sign. I think every programmer has had to do this boring task a least once on a very large list of fields, and it's boring like hell :)

     
    • Nobody/Anonymous

      For those problems I use the caret functionality. This are only 2 steps.

       
    • Nobody/Anonymous

      Try also regular expressions:

      Find:    (.+) = (.+)
      Replace: \2 = \1

      Best Regards
      Jens

       
    • Nobody/Anonymous

      Well, this would work with the small example I gave, when the text is perfectly aligned on both sides of the equal sign, but if you have a long list of fields and the language you use does not provide you with any mean to automate the process, then that kind of feature would be helpful :)