Is there a way to append string to the end of lines in Eclipse?
Search and find seems like it would work, but using find with just the regex expression $ does not find any strings. .$ will find something, but running find replace with this deletes the last character of your line, which is undesirable. Does anyone know a way to accomplish this in Eclipse? Is there something I am doing wrong with my regex that might make Eclipse not understand this, while other editors like vim handle it just fine.. (in Vi / Vim :0,$s/$/appended to end of line/).
Surely I am not the only person who wishes there was this functionality… It’s offered by most other good editors. Could this be considered a bug?
I agree that this is a bug in eclipse. I tried the same as you with the same results. I also tried to use the regex search string “(?<=.)$” to try to ignore the single character match in the replace but that failed as well. One should be able to search for end of string to append.
Here’s a trick to make it work,
This replaces the single character match before the end of line and appends foo.
That’s a lot of hoop jumping but at least it works.