There are 3 tiny things that can be easily implemented in Geany:
1. Having %f, %d, %e, %p, %l in context command (just as in Compile/Build/Run).
2. Having three context commands (they would be roughly corresponding to the Compile/Build/Run) mapped e.g. to Ctrl+F1, Ctrl+F2, Ctrl+F3. Now we have one and only context command.
3. Having possibility to process multiline selection, if context command equal to the naked "%s". Now we can process only one line of selection.
---------------------
I try and show how the context command can be used with all its beauty.
Imagine we have a Python module under testing in Geany. And it is called with parameters. And the parameters are changed from time to time.
Goings to Run command setting every time are tiresome. And dull nuisance when we have this cool CONTEXT COMMAND.
All we need is to make a multiline Python comment in our module (let it be mymodule.py) containing something like: ``` """ BEGIN OF TEST BLOCK: mymodule.py testpar1 mymodule.py testpar1 testpar2 mymodule.py testpar1 testpar2 testpar3 etc. END OF TEST BLOCK """ ``` ... and to set THE CONTEXT COMMAND equal to python3 %s
After that we select a line with current test parameters and call the context command from popup menu or with hotkey.
By this we get a batch of self-documented test cases directly inserted in the code! By this we don't touch RUN settings of other Python modules. It seems to be the main advantage of this.
mymodule.py could be smartly replaced with "%f" if Geany allowed it. It would enable independence of code on renaming, moving to other platform and so on. After all, it's shorter than "my_supposedly_gigantello.py"
---------------------
Now about the issue.
If we key mapped CONTEXT COMMAND to Ctrl+F1 (or even F1, leaving to Geany only menu to call its help), then it works. Sometimes, however, it works not.
For example, select the following ` #include` and call the context command from popup menu - it will process the "#include" OK. But Ctrl+F1 ignores our hotkeying it.
It occurs every time when we selected something more complex than just a word. ----------------------- It is not awfully good if we would try the above example of using CONTEXT COMMAND. -----------------------
Edited the above to remove the shouting markup. Please learn github markup before you comment, you also pinged another user in your last post on the previous issue.
...Silence is the best answer for him:) Well, I have **another proposition for Geany team**. 4th. Context command is equally (in fact more) dangerous as Compile/ Build/ Run. The last ones have their insurance card named "Save before ...". The Context command has not. Violation of human rights, isn't it?
@aplsimple Geany is a project run by volunteers in their own time and with their own interests. If anybody (not just project team members, this is open source development) thinks your proposals are of interest to them, they may address them. If nobody is interested in the particular items they may not. Or they may be busy with "real life" and not have time just now.
The best way of advancing enhancements is to provide pull requests.
C'est la vie. I'll try pull requsts. Great thanks for your advices.
Closed #1807.
Reopened #1807.
Oh, no, no. They are all tough coders there in pool requests, what is to do there for me stupid? So let my weepings be in issues.
Closed #1807.
github-comments@lists.geany.org