Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Sorting text #2782

Open
mdziczkowski opened this issue Apr 12, 2021 · 13 comments
Open

[Feature request] Sorting text #2782

mdziczkowski opened this issue Apr 12, 2021 · 13 comments

Comments

@mdziczkowski
Copy link

mdziczkowski commented Apr 12, 2021

Please add the possibility to sort lines by given by the user criteria.

I don't know why, but this important functionality is not existing as an build-in function, and need to become loaded as plugin to become avaliable

@elextr
Copy link
Member

elextr commented Apr 12, 2021

Given that not everybody needs line sort and that it is available in the line operations plugin I doubt it will be added to base Geany.

@eht16
Copy link
Member

eht16 commented Apr 12, 2021

Not sure what exactly you imagine by "by given by the user criteria" but simple sorting can be done easily (without plugins) as described on: https://wiki.geany.org/config/customcmds/sort-selection.

@mdziczkowski
Copy link
Author

mdziczkowski commented Apr 13, 2021

@eht16

Not sure what exactly you imagine by "by given by the user criteria" but simple sorting can be done easily (without plugins) as described on: https://wiki.geany.org/config/customcmds/sort-selection.

example user criteria:

  • case sensitive/insensitive
  • regex
  • full text
  • exact text
  • other

@elextr
Copy link
Member

elextr commented Apr 13, 2021

@mdziczkowski if there are criteria that the line operations plugin does not provide feel free to request them, or better yet make a pull request on it.

@elextr
Copy link
Member

elextr commented Apr 13, 2021

@mdziczkowski just to expand my initial comment

Note that there are far too many possible functionalities to build everything in, all IDEs and editors use plugins/extensions to extend functionality rather than add it to the core for several reasons:

  1. Just because its important to you doesn't mean its important to everybody, people editing source code don't need line sort since sorting code lines doesn't make sense, but other language specific sorts might, so why should everybody wear the cost of the features. A quick search of the vscode extensions found a whole page of various sort extensions targeting different use-cases including your by-line case.
  2. because plugins/extensions have a defined interface and can be excluded they can be created by people with less experience in the internals of the application allowing more people to contribute, code that is built in needs to be better quality because it can't be excluded if it causes problems, so it causes more work for the core team and requires more knowledge and experience of the contributors, so less overall improvements happen if its all in core.
  3. if something is in core there is only ever likely to be one way of doing it, so areas where there is a big divergence of use-cases for a particular functionality its better to have that functionality as plugins/extensions so users can choose the one that suits their use-case, hence two project plugins and two debugger plugins in the geany-plugins collection.

Also, with the external sort that @eht16 pointed out, you can of course use any criteria that an external program can support and you can use that now without waiting for anything to be added to the plugin or core. You can even write your own esoteric sort scripts in any language you like, whereas Geany is C only.

@mdziczkowski
Copy link
Author

You could make at latest that the plugins were easy to import thru an Plugin Manager (like in for example Sublime3) , instead of the need to manually download and compile them (however, some plugins does not have the "configure" and "Makefile" present to do that)

@elextr
Copy link
Member

elextr commented Apr 14, 2021

As I noted above, Geany and current plugins are C, they have to be compiled, they are not an interpreted language like Python that sublime uses, so Geany plugins cannot be just downloaded and run.

Geany is an entirely volunteer project, when someone contributes a capability for non-C plugins things may change (there are external projects that do that, but they have not been contributed to the main project, its entirely up to the external project to make that decision).

Most Linux distributions have Geany and the Geany-plugins collection available to install using their standard package management tools (but note such packages are not made by this project directly) and Windows and OSX builds are available in the downloads page so its not normally necessary to compile them yourself unless you are developing a new plugin.

however, some plugins does not have the "configure" and "Makefile" present to do that

Where are you getting those plugins from? All the Geany-Plugins collection should have makefile.am and Makefile is created by configure which is created for the whole collection by autogen.sh if you use the git repository see here, or should exist if you use the tarball see here. This is the standard autotools build methodology.

@mdziczkowski
Copy link
Author

There is only autogen.am and none else mentioned by you tools (autogen.sh, configure)

Additional question: why the plugins aren't provided in a pre-compiled version ?

@elextr
Copy link
Member

elextr commented Apr 14, 2021

There is only autogen.am and none else mentioned by you tools (autogen.sh, configure)

Where are you getting the source from? autogen.sh is in the Geany repository and generates configure as I said. It is also in the tarball which also has configure pre-generated so you don't need the tools to make it.

Additional question: why the plugins aren't provided in a pre-compiled version ?

As I said above, individual Linux distros provide binaries because they need to be configured for that distos rules, and Geany releases provides binaries for Windows and OSX since they are a single platform and don't vary like the Linux distributions do.

@mdziczkowski
Copy link
Author

Where are you getting the source from?

geanie-plugins on GitHub

As I said above, individual Linux distros provide binaries because they need to be configured for that distos rules, and Geany releases provides binaries for Windows and OSX since they are a single platform and don't vary like the Linux distributions do.

in this case, it would be a nice idea to create a pre-compiled plugins for separarelly Windows and Linux. Take into attention that not everr end-user has knowledge, experience or developer skill's to self compile the plugins that he/she would need for work, so sharing only the sources (without the binary version) would discurrage them from using Geany and would make them search an better editor with either has such functionality build-in or would allow to easy install an nessecary plugin

@elextr
Copy link
Member

elextr commented Apr 14, 2021

Where are you getting the source from?

geanie-plugins on GitHub

When you clone Geany-Plugins repository you get autogen.sh in the top level directory which generates configure which generates makefiles, thats how autotools works.

in this case, it would be a nice idea to create a pre-compiled plugins for separarelly Windows and Linux.

I don't think you understood, the Windows plugin binaries are on the download page I linked.

And as I said, for Linux every distribution is different, they put files in different locations, they use different packaging tools, they use different compiler versions and library versions, some don't even use binaries at all, so the Geany project can't provide pre-compiled binaries for "Linux", its just not like windows.

But the distributions provide binaries configured for their system as part of their distribution. So I still don't understand why you say a user needs to compile any of the plugins collection, they get the plugins they want from their distribution.

On this particular distribution I am using here I just open the software manager select the programming group and presto!! Geany is the top of the list, click to install, then scroll down a bit and Geany Plugins collection is available as one item, click to install, done!!

@mdziczkowski
Copy link
Author

mdziczkowski commented Apr 14, 2021

Do you remember that we were talking about the plugins and not the Geany itself?

@elextr
Copy link
Member

elextr commented Apr 14, 2021

Do you remember that we were talking about the plugins and not the Geany itself?

Yes. "then scroll down a bit and Geany Plugins collection is available as one item, click to install, done!!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants