Line sorting?

User avatar
ander
Posts: 11
Joined: 21.11.2013 07:49

Line sorting?

Post by ander »

Is there a way to sort lines (in ASCII order) in SW?

I found this project ("issue"?), but I don't see any way to download it. Also, it's for something called CudaText—is that the same as SynWrite? I couldn't find any explanation of that, either.

As you can see, I'm helpless, as usual, even though I'm half-Russian.
miro.matas
Posts: 67
Joined: 26.08.2013 06:16

Post by miro.matas »

install plugin Sort, works very well
Attachments
Sort4SynWrite.png
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

CudaText is new text editor, http://uvviewsoft.com/
User avatar
ander
Posts: 11
Joined: 21.11.2013 07:49

Post by ander »

miro.matas wrote:install plugin Sort, works very well
Thanks! The Add-ons Manager is elegant. Nice work. As an annoying tech editor, I have 2 suggestions:

• In the Install list, about adding a checkmark or something next to the addons that are already installed?

•When the dialog box appears that says "Do you want to install [add-on name]", how about including this line?:

Note: New add-ons take effect after you restart SynWrite.

I also noticed that if you try to use the Sort plugin without making a selection, nothing happens. People often want to sort an entire file—so in most editors, when a Sort command is used without a selection, a message appears that says (e.g.), "Do you want to sort the file's entire contents? [Yes/Cancel]". Do you think it would be a good idea to add that functionality?
Alexey wrote:CudaText is new text editor, http://uvviewsoft.com/
I've seen references to it, but I didn't understand its relationship to SW. Is it actually better than SW? (Will SW eventually be retired?) Or is it a parallel project for some reason? As you can see, I have many questions.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

About plugin Sort, using of all file:
readme.txt:
To allow to handle all text w/out selection, set the option:
call plugin command "Edit config", and set
[op]
allow_all=1
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

CudaText is new editor. No relation to SW. SW not active now.
User avatar
ander
Posts: 11
Joined: 21.11.2013 07:49

Post by ander »

Alexey wrote:About plugin Sort, using of all file:
readme.txt:
To allow to handle all text w/out selection, set the option:
call plugin command "Edit config", and set
[op]
allow_all=1
OK... I assume that this part:
Alexey wrote:...set the option:
call plugin command "Edit config"...
...means this?:

Options > Add-ons manager > Edit > Sort

...to open the Sort add-on's Python script? And this part:
Alexey wrote:...and set
[op]
allow_all=1
...means to add this code somewhere?:

Code: Select all

[op]
allow_all=1
But where? I don't think I'm supposed to add it to any of the "Def" subroutines... Maybe near the top, after this?:

Code: Select all

import os
from random import randint
from sw import *
from .app_specific import *

fn_ini = get_ini_fn()
op_section = 'op'
Alexey wrote:CudaText is new editor. No relation to SW. SW not active now.
Okay, I'll try it! SW does everything I need, but I want to see your great new project too.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

No, it means
Plugins/ Sort/ Edit config
it opens .ini file, in it add new strings.
User avatar
ander
Posts: 11
Joined: 21.11.2013 07:49

Post by ander »

Hmm... When I do that (Plugins > Sort > Edit config), nothing happens.

Can I edit the file manually? Are we talking about SynPlugins.ini? I see lots of references in there to Sort, but there's no actual Sort section. If I just paste the code at the end of the file, how does SW know which plugin it's for?

BTW, I suppose I should be grateful for situations like this... It's why people hire technical writers like me. Engineers like you guys are brilliant, but it can be surprisingly hard for people who already know how to do something to explain it to someone who doesn't already know. It's also why numbered steps were considered such an innovation. ;?)
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

If file dont open, it is file C:\SynWrite\Settings\syn_sort.ini
Why it dont open?
(non stantard path to Synwrite? error in Console pane?)
It has text like

Code: Select all

[op]
rev=0
nocase=0
del_dup=1
del_sp=1
numeric=0
Locked