Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » Trailing spaces, upper/lower case etc.
Trailing spaces, upper/lower case etc. [message #7638] |
Fri, 12 January 2007 02:09  |
agent86
Messages: 11 Registered: December 2006 Location: San Francisco
|
Promising Member |
|
|
I'd like to be able to remove all trailing whitespace, either by command or at file save time. Also, there are times when that darned Caps Lock key is set and I don't notice for awhile. Would love to select the whole bunch and be able to change its case with one click.
I have looked at the menus and the Esc scripting language but haven't been able to find a way to do these things without going to some other editor which has them built in. Well, OK, I won't go to another editor for capitalization alone, but..
Anyway, is there is a way to manipulate text via Esc or directly?
chuck
|
|
|
|
Re: Trailing spaces, upper/lower case etc. [message #7763 is a reply to message #7638] |
Sat, 20 January 2007 16:39  |
Werner
Messages: 234 Registered: May 2006 Location: Cologne / Germany
|
Experienced Member |
|
|
agent86 wrote on Fri, 12 January 2007 02:09 | I'd like to be able to remove all trailing whitespace, either by command or at file save time. Also, there are times when that darned Caps Lock key is set and I don't notice for awhile. Would love to select the whole bunch and be able to change its case with one click.
|
Well, for months I'm intending to write a macro tutorial which should include some useful examples, e. g. macros which do what is requested above.
Unfortunately, for lack of time I still haven't done it.
Anyway, here are the wanted macros - without manual.
I suggest you create a directory named "UppLocal" outside of the UPP file system and put the attached file into it. Then make a copy of this directory and put the copy into the main UPP directory. Now TheIDE should show an additional menu called "Macro" which presents "Lowercase", "Trim right", and "Uppercase".
Please note:
1.
These macros work on selections only.
2.
As I mention above I have everything but time - so the macros are nearly untested. If they don't work as expected, just correct them. They should be good enough to learn how a macro is written.
3.
Watch out, Unix (Linux), and MAC users!
I have little or no experience with Unix / Linux and MAC, respectively. And of course there wasn't any test. I only believe that "Trim right" should work under these OSes, too (new line issue: Windows = CR, LF; Unix / Linux = LF (?); MAC = CR (?)). Tell me if you know better.
Werner
[Updated on: Sat, 20 January 2007 16:40] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Apr 28 14:12:38 CEST 2025
Total time taken to generate the page: 0.00725 seconds
|