Discussion:
[notepad-plus - Help] RE: Massive removing of whitespaces ending line
(too old to reply)
SourceForge.net
2007-12-19 19:42:45 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4683358
By: nobody

Yes, there is. It's called Trim trailing spaces.

Menu: TextFX
Submenu: TextFX Edit
Option: Trim Trailing Spaces

Be sure to select some text before you select an option, otherwise you will
get a message about this. Unfortunately, TextFX doesn't act on the complete
text in that case. This would be very intuitive, at least helpful.

Unfortunately for you, this won't remove trailing tab characters (and other
spaces before those). You can use a regular expression to replace all the ending
white spaces.

Find:
[ \t]+$
Replace by:

[leave the Replace field empty]

Make sure Regular expression is checked in the CTRL+R advanced Find/Replace
or CTRL+H Replace dialog.

You could also write a simple script and execute that using the Simple Script
Plug-In if there are more conversions or layout preferences you want to perform.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-19 19:49:22 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4683364
By: fidvo

This is a one-liner in SimpleScript:

trimright(" \t")

There's also a trimleft and trim function that work the same way. Trim does
both sides.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-19 21:11:03 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4683608
By: nobody

Hi Fidvo,

After promoting your Simple Script Plug-In a couple of times and reading this
very simple example, I found it was time to download and try it for myself.
It looks very convenient!

I tried to write a message on the Simple Script Plug-In forum, but you have
to log in there. I hate it when I have to do a lot of (unnecessary) things to
just say something or ask a question. It's like buying something in a store
and having to leave all your personal information just for... for what? Hey,
I'll come and buy something if I need it.

Perhaps the Run Script option could be renamed into something more intuitive.
I thought I could run a script here, one of a number of already existing scripts.
But it actually is a Script Writer as the window's title says. Perhaps you could
name both Script Composer (as the window doesn't write the scripts itself, will
that come soon? *lol*), which in my opinion, is more descriptive. Perhaps you
could even create some submenu structure to store favorite scripts, allowing
to directly execute a script and with the possibility to create new submenus.
I don't know if that is hard to do.

Is there any way of handling the favorites right now? It just seems to be a
fixed list. Of course, it is possible to edit the SimpleScript.ini file, but
a more convenient way would be welcome.

The modal window makes it hard to do anything when returning from another
application. Notepad++ itself and the current document won't be visible. So
I have to close the composer window and re-open it. It's also possible to simply
validate the script: Notepad++ will become visible again, then.

I ran one of the sample scripts, Single-space to double-space. I was thinking
this would double all my space characters, but in fact it added some CR/LF's.
Perhaps another description would be better.

In the function list, the hints are not very helpful. They won't display more
width of the text than the list in the window itself does. So the only way to
see the complete description is to scroll the window horizontally or click on
it to see the description in the box below the list.

Would you consider Proper Casing the function names? This would help me a lot
in more quickly reading their names and directly getting some idea of what they
are about.

I was looking for some file describing all these functions and found the ReadMe.txt.
(I prefixed all the files with SimpleScript, since they are all in the root
PlugIn folder.) I was wondering if you could apply some layout to the ReadMe
file which allows folding. Perhaps you could creating something of a User Defined
Language for that allowing easy reading in Notepad++.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-19 21:26:04 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4683639
By: nobody

Yeah, the second is great:) Thx guys!

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-19 21:34:05 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4683646
By: nobody

It would also be nice if double-clicking on a function would replace the current
selection in the script field. It now seems to insert a line with the clicked
function text before the line the cursor is on. (The ReadMe file says it _adds_,
which may be interpreted as appended at the end of the script.) It would be
convenient if I could select a number of lines and replace them all at once
by a function by double-clicking it.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-19 23:24:57 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4683838
By: fidvo

1) Perhaps the Run Script option could be renamed into something more
intuitive.

I'll think about it. There's nothing special about the name "Run Script" except
that in a plugin based upon scripting, it sounds like the most basic and common
task. "Script Composer" is perhaps a little more descriptive, but it might
make you think twice, especially since I plan to add several new menu options.

2) The window doesn't write the scripts itself, will that come soon? *lol*

That's the next feature planned right after the Artificial-Intelligence Logic
Unit and the Read-My-Mind module. (That's a joke, for the humor-impaired. Please
don't hold me to this.)

3) Rename Script Writer to Script Composer.

I'll consider this in conjunction with #1 above.

4) Perhaps you could even create some submenu structure to store favorite
scripts.

I'm planning to allow you to create your own categories for your favorite scripts.
You'll notice there's extra room in the Favorites pane. This is to allow a
second drop-down list later on - one for the category and one for the script.

5) It is possible to edit the SimpleScript.ini file, but a more convenient way
would be welcome.

When I implement #4 above, I'll add an interface in the plugin itself so you
don't have to manually edit the .ini file.

6) The modal window makes it hard to do anything when returning from another
application.

Ultimately I plan to change it to a dockable window. This was just the easiest
thing to implement up front so I could at least get something done quickly.

7) I ran one of the sample scripts, Single-space to double-space.

The sample scripts are just that: samples. I just threw some together off the
top of my head to demonstrate how to do it. Feel free to discard, add, or modify
scripts as needed.

8) [The function list hints] won't display more width of the text than the list
in the window itself does.

Unfortunately, that's standard behavior in Delphi. I don't have any control
over that. I probably ought to just disable the hints entirely.

9) Would you consider Proper Casing the function names?

In the script itself they're case-insensitive, so I assume you're talking about
in the function list. That's probably a good idea; unless I can think of any
reason why I shouldn't, I'll fix it in the next version.

10) I was wondering if you could apply some layout to the ReadMe file which
allows folding.

Once I set up the function list to display the detailed description along with
the brief description when you click on a function, you shouldn't need to look
at the ReadMe file very much any more. This will be a lot less work than trying
to fix the ReadMe file to allow folding and still keep it readable.

Thanks for the suggestions. If you have any more, I'd appreciate it if you
would post it under the latest SimpleScript thread in the Plugin Development
forum. (Just doing my part to help stamp out thread-hijacking)


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-20 20:20:43 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4685545
By: nobody

Mmm, it would be nice to be able to require _some_ user input other than a login
which requires registration. If I would like to look in a shop, it would be
no problem at all for me to have to press a button. I could always enter any
shop I'd like to, that way. But if I have to become a member first to get a
pass for the door, it's not quite inviting. I'd rather visit the next shop then.

I'm not sure though if SourceForge has a feature to ask the user to type in
some otherwise visible information to check against robotics.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-20 20:28:06 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4685556
By: fidvo

I was actually referring to the "Simple Script 1.05 released" thread on the
Plugin Development Forum (which doesn't require you to log in), not the SimpleScript
forum on the Notepad++ Plugins Project page. I regularly check both to look
for ideas for new features. I'm sorry if I was ambiguous.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-20 20:35:54 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4685565
By: nobody

Oh, well, you're right. I see now, I read over that. Just another forum to check,
then...


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-21 02:55:30 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4685924
By: bullock
Post by SourceForge.net
8) [The function list hints] won't display more width of the text than the
list in the window itself does.
Post by SourceForge.net
Unfortunately, that's standard behavior in Delphi. I don't have any control
over that. I probably ought to just disable the hints entirely.

I'd call that *default* behavior in Delphi, but there's a way around it. I'll
modify your files a bit and send them to you to illustrate what I mean.

Regards.
Greg


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2007-12-21 14:57:07 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4686578
By: fidvo

Thanks, Greg. I'll make sure it gets into version 1.1.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754
SourceForge.net
2008-01-02 19:29:46 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4698429
By: nobody

isn't this what regular expressions are for?

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331754

Continue reading on narkive:
Loading...