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.
-----------------------



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1807

Reply via email to