mihnita / ansi-econsole

Eclipse plugin that understands ANSI escape sequences to color the Eclipse console output.
http://www.mihai-nita.net/java/
Other
91 stars 25 forks source link

support copy/paste without escape sequences #19

Closed martinlippert closed 8 years ago

martinlippert commented 8 years ago

Would be great if copy/paste form the console view (with ANSI coloring) would skip the escape sequences, so that people could safely copy text from the console and paste it somewhere without getting all the escapes.

Maybe a preference for this would be good, in case someone needs the escape sequences. But the default setting should be "without escapes".

paulvi commented 8 years ago

As an idea, could it better to use ANSI Console switcher to control if source has or not escape characters. ... or do a special switch for this on the console View toolbar...

paulvi commented 8 years ago

or special "copy plain text" icon on View toolbar

mihnita commented 8 years ago

Thanks for the idea... Probably "copy plain text" icon is the easiest one (I am not sure I can "intercept" the standard copy hotkeys) I'll give it a try, maybe even this week-end :-)

mihnita commented 8 years ago

Implemented and published (version 1.3.2.201603061758)

paulvi commented 8 years ago

Great

martinlippert commented 8 years ago

This is great, thanks for the quick feedback and turnaround here. Much appreciated. However, I would still prefer to have a preference setting that defines how the usual keyboard shortcuts should behave (include or exclude the escape sequences) - and get that preference set to "exclude escape sequences" by default - so that the usual "copy and paste" works as expected for the user when having ANSI coloring in the console. I think most people would like to quickly copy/paste a piece of text to somewhere else - and usually don't want to see cryptic ANSI color escape sequences in there... This is especially the case when people working on apps, they get an exception, and want to look that up or paste it into a bug report - for example.

martinlippert commented 8 years ago

I added a pull request for turning the default copy action into one that removes escape characters.