Auto-intendation and RTrim - 2 IDE-plugins

Developed or developing a new product in PureBasic? Tell the world about it.
Hurga
Enthusiast
Enthusiast
Posts: 148
Joined: Thu Jul 17, 2003 2:53 pm
Contact:

Auto-intendation and RTrim - 2 IDE-plugins

Post by Hurga »

I wrote two small plugins for the new IDE. Mainly cos I miss these functions (I have to confess that I´m a jaPBe -fan...)
There are s small how to install in the zip.files. Its in german, but with a pic, so this should be no prob to understand and to install...
(Its mainly for the arguments)

Here are the links.

http://dostej.pureforge.net/Files/Auto% ... dation.zip

and

http://dostej.pureforge.net/Files/RTrim.zip
both are about 18k

Hope you can make use of it.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Hi!
I cant get the auto indent to work :S
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

same for me :?
Please correct my english
http://purebasic.developpez.com/
Hurga
Enthusiast
Enthusiast
Posts: 148
Joined: Thu Jul 17, 2003 2:53 pm
Contact:

Post by Hurga »

What is the problem?
Can you install the plugin ?
Does it do anything?
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

The Indent Plugin does not do anything, I followed the instructions in the Doc file.
Thanks
Truth Seeker
Hurga
Enthusiast
Enthusiast
Posts: 148
Joined: Thu Jul 17, 2003 2:53 pm
Contact:

Post by Hurga »

Hm, really strange. It works fine with me.

Some things that can be the fault...

You use not the newest release of the IDE
You used the plugin with an unsaved source (means you have to save the sourece first, otherwise the plugin isnt working)
You had a selection in the source

Otherwise I had no idea why it is not working...
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

I am using the latest IDE, just did a update to be sure.
The source was saved.
I had no selection in the source.

I tried both with and without a selection.

The code I was trying to indent was this:

Code: Select all

If test = 0
test = 10
EndIf
I expected the plugin would change it to this:

Code: Select all

If test = 0
  test = 10
EndIf
It does seem to do something because the IDE shows that the file has been changed but I do not see any changes.
Thanks
Truth Seeker
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

it works, my config:

Image
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

Intresting it works now with the %FILE being inside the double quotes. I dont understand why though.
Thanks
Truth Seeker
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Post by dell_jockey »

Hurga,

thanks a lot for this utility. Your documentation states, that you don't know what happens if you select/mark the entire source code.

Well, if you just use your tool without selecting any text, it indents the text with an indent size of two spaces.
If you select the entire text and start the your tool, it does the same, but indents with an indent size of four spaces...
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

Hurga thanks for this tool.
Thanks
Truth Seeker
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

check pb ide docs, it states that to include SPACES in filenames / paths it is a wise thing to add quotes around parameters passed
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

blueznl wrote:check pb ide docs, it states that to include SPACES in filenames / paths it is a wise thing to add quotes around parameters passed
Thanks.
Thanks
Truth Seeker
Hurga
Enthusiast
Enthusiast
Posts: 148
Joined: Thu Jul 17, 2003 2:53 pm
Contact:

Post by Hurga »

Thx
I´m happy if someone can use it.

If someone is interested in the code, it sould be downloadable forme here...

http://dostej.pureforge.net/Files/PB%20 ... Source.zip

But beware: Its not ... hm lets say... very structured
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

Thanks for letting us see the source.
Thanks
Truth Seeker
Post Reply