Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
agent86 is currently offline  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 #7650 is a reply to message #7638] Fri, 12 January 2007 21:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12126
Registered: November 2005
Ultimate Member
agent86 wrote on Thu, 11 January 2007 20:09



Anyway, is there is a way to manipulate text via Esc or directly?

chuck


Yes, you can write TheIDE macros for this. The documentation is even in TheIDE help page....

Also, if you search the forum, there were posts with some interesting .usc macros.

Mirek
Re: Trailing spaces, upper/lower case etc. [message #7763 is a reply to message #7638] Sat, 20 January 2007 16:39 Go to previous message
Werner is currently offline  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. Cool

Unfortunately, for lack of time I still haven't done it. Confused

Anyway, here are the wanted macros Very Happy - without manual. Rolling Eyes

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. Laughing They should be good enough to learn how a macro is written. Twisted Evil

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

Previous Topic: PATCH: Improve quick comment/uncomment
Next Topic: Smart tips [FEATURE REQUEST]
Goto Forum:
  


Current Time: Mon Dec 16 01:30:03 CET 2019

Total time taken to generate the page: 0.02017 seconds