This commit provides 1 correction and 2.5 enhancements for Geany's context action:
1. The correction is:
- In case you hadn't set the context action, calling a popup menu on a selected text/word brings up a menu with all 'goto & context' items being enabled. The context doesn't work at that, of course. It should not be enabled: 1) when no text is selected 2) even more important: when there is no context action set. This commit corrects this.
2. The enhancements are:
- This commit introduces %f, %d, %e, %p, %l placeholders into the context string, i.e. the same ones as in Compile/ Build/ Run. Without them the context is somehow (indeed much) restricted.
- (As consequence) the set context action is active when there is no selected text or a word under caret. Even if there are no placeholders in the context string it may contain a really useful command to access with a fast hotkey, all the more the context is specific to the file type. This commit always enables the context if it's defined in Geany's settings no matter there is or no placeholder in it.
- (0.5 of enhancement) if there would be some new 'goto & context' menu items with their own requirements for access, this commit would facilitate their implementation.
There are a few bla-bla left. This new Geany's context can respond not only to %s, %f, %d etc., but to all Geany's surroundings. E.g. it can show a current state of the project from different viewpoints. Or perform the various actions for maintainance of it. All that done without leaving Geany IDE. One of innumerable possible implementations is here:
https://wiki.geany.org/howtos/using_with_tcl_tk
As a matter of fact this commit was born of it.
----
About the modifications of code.
1. For the access to 'build_replace_placeholder' function (introducing %f, %d .. placeholders) I need to modify build.c and build.h.
2. It is included in the proper place of callbacks.c.
3. To unlock the context (and move its access check to other place) I need to comment a line of keybindings.c. Actually this unlocks the hotkey of context.
4. To enable a separate (from other 'goto' items) checking of context access, I need to modify ui_utils.c (and its ui_utils.h).
5. The real access to all 'goto' items (the context including) is checked in editor.c.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1841
-- Commit Summary --
* Correction and enhancements for context action
-- File Changes --
M src/build.c (3)
M src/build.h (1)
M src/callbacks.c (10)
M src/editor.c (18)
M src/keybindings.c (2)
M src/ui_utils.c (10)
M src/ui_utils.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/1841.patchhttps://github.com/geany/geany/pull/1841.diff
--
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/pull/1841
Steps to reproduce:
1. create a new file using the tree browser
2. give the file a name
3. Try editing the file
4. Try saving.
OS: Windows 10
--
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/1842
m4 is currently handled by the shell/bash syntax highlighting which works more or less. Besides the missing keywods (which could be added in a user filetype configuration) the string highlighting does not work. I haven't found a way to get this to working with changing the configuration only.
Basically m4 does open strings with backtick quotes and closes them with simple single quotes. The scintilla lexxer does not support a different closing quote for a backtick open character. Maybe that could be added as a scintilla bash lexxer option.
--
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/1844
There is some problem with Geany's context action.
At first let me cite the announcement of Geany 1.33 release:
_Some highlights: Show status message on attempt to execute empty context action_
Another cite is from an old good English dictionary:
_**context** n. the parts (of anything written) which go before or follow a word, expression or passage and which help to fix its meaning._
Combining these two quotations and applying them to the software we can see that the Geany's context is no context at all. To be more exact, this context is restricted to a selected text of Geany editor.
The real context should include the maximum of Geany's environment (after all, Geany is IDE :), i.e. it should contain:
* a current file name
* a current file directory
* a current file type
* a current file encoding
* ... and so on ...
... for other options see "Statusbar Templates" and "Substitutions in commands and working directories" of Geany's help.
Also, Geany's location would be useful in the context because a context handler might require Geany to edit some files.
I try and explain why it's so important to have all this stuff in the Geany's context.
https://wiki.geany.org/howtos/using_with_tcl_tk shows one of many possible implementations of Geany's context processor. And here is its illustrating screenshot:
![fossil2](https://user-images.githubusercontent.com/37333988/39066066-7ce72ef8-44dc-11e8-8cb5-1ac88223b265.png)
Please, pay attention to the outlined parts. The fossil commands for processing _e_menu.tcl_ might take out the file name from Geany's context line as _%f wildcard_ if Geany did better. Instead of this, _e_menu.tcl_ (the name of file edited in Geany IDE!) is a literal text hammered into the menu items.
Other outlined parts in the picture demonstrate a usage of %s (current context of Geany) and its stripped of special symbols version. All this is great but far from satisfactory.
Turning to that announced Geany's ignoring the empty context, we can see that it's no highlight.
On the contrary, it's a serious mistake to restrict Geany this way. It's no Geany way.
Shortly, Geany's context has the obvious TODOs:
* to include the maximum of Geany's environment into the context string
* as consequence, to allow the call of context processor when %s is empty
and (as ideal):
* to include %s wildcard into "Compile/ Build/ Run" strings
Probably, it's in no way a hard task as there are similar features in the "Compile/ Build/ Run" settings.
----------------
P.S.
A few words about Fossil VCS used in the picture above. It hasn't a direct support in Geany (as Git has) but it's very good for a compact team of developers, say 1 to 10, almost as good as Geany is. So that Fossil and Geany are nearly of the same niche. In some aspects Fossil is better than Git, e.g. its presentation of software history is better than Git's. As well as Fossil's way to roll back and redo back the changes. SQL in all its beauty. Of course it's "imho" only. I employ Git and Fossil on the same project - Git for highlighting the changes in Geany editor after the major commits, Fossil for all the rest.
--
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/1836
I've been using Geany for longer than I'd like to admit. It certainly isn't the worst editor I've used. I'm yet to find something I can straightforwardly switch over to without too much re-thinking. This being said, there are a few, er, *design decisions* that occasionally hit my usability thresholds and momentarily prompt serious (re)consideration of what else is out there. For now, nothing else meets my criteria, so I thought I'd complain about Geany bit. :P
One of the big issues I face is the "way too many open tabs" problem. Chrome "solves" this by simply falling apart at the seams if there are too many tabs in a window. Definitely a hacky approach to UX design; it prompts users to discover the wonder of *m̩͈̊͂u̩̟̾́l͈͇̀̒t͍̞̎́ḭ̥̊͘p̞͔͐̄ḻ̛̜͌ě͔͔͘ ͉̜̔̃ẁ̖͖͛í͉̦̀n̜̯͐͒ḑ̳̆͌o̳͆̅ͅŵ̟͖̾s̖͕̒̾ of too many tabs ę̷̳̝̙̰̯̞̮͇͈͍̝̪͉a̶̡̧̝͙̹͉̲̮͉̖͎̜̹̠̫͜c̷̨̢̢͖͍͍͓̺̫͙̪͎̱ͅh̴̢̢̨̨̤͓̝̙̞̙̦̩͍̣̘̻*, which ~~*d̛͙͉̹̤̳͊̃̒̕e͇̹̗̟͙̎̇́̓͑ȅ͔̯̖̺͚̒̆̾͆p̦̤͚̜̀̈́̓̂̕͜ë̢͉͔̙͈̃̿̕͝ň̟̤̥͚̦͋̂͗̍s͍̜͈͚̫̐̉̅̓͠ ̲̗̫̖͔͗̀͂̍͌t̡̪̹̹̤̾͑͌͌̐h͙̺̥͍͕͑̇̄͒̽ē̼̦̰͉̖̑͑̄̑ ̨̼̬̩̏̎̔̌͝ͅr̹̣̻͔͛̂̓̍́͜ą̛͚͈̙̦̓̉̀̕b̧̠̦̹̈́̃̏͌̔ͅb̩̱͓̤͑̑̎́̇ͅi͖͓̫͍͈̅̉̂̽̓t̼̺̤̞̜̃̑͆̍̎h̤̠̲̥̦͑̅̃̐́ő̲̦̘̗͎̑̋̋͝l̲̦̞̘̮̐̔̂̄̈́e̟̲͎͉̳̐̆́̊͘*~~ temporarily mitigates things somewhat.
Geany provides no such opportunity; I'm stuck lumping files I occasionally edit every six months but don't want to forget about into the same spot as code I'm currently working on. (Project files too are heavily self-specifying/opinionated for me to apply them as a generic solution to this problem.) Being reminded of old things and "ah, that old tab, no don't accidentally cl--agh, go and reopen it" tends to be very flow-breaking.
I'm currently trying to work around this issue by opening multiple instances, but that introduces problems of its own (see #1834). Besides the implementation bugs, the biggest gripe is the clunkiness of the UI.
**It would be *awesome* if I could drag tabs between instances.**
It would certainly be possible to use drag-n-drop and X11 IPC to do a complex dance to "move" files between instances. But that would be a *ton* of work for one comparatively tiny feature.
--
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/1835
Hi! Anyone here could tell me how to include a line in keybindings.conf so as to run a bash script when a key is pressed? Say that `/.local/bin/toggle` must be launched when `Tab` is pressed.
Not really an issue, the issue is in fact that there's little information on how to do this.
--
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/1541
The ubuntu ppa for dev given in help pages, https://launchpad.net/~geany-dev/+archive/ubuntu/ppa, contains only old versions <= 1.27.
I have already tried to follow the installation with make, etc. but it doesn't work (probably my misunderstanding...).
So I still use 1.27 where I want to use 1.29 :-)
Is there a way to help (with my unknowledge of C, I use geany for web development) updating the ppa?
Thanks for that great product indeed!
--
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/1338
I have:
- Rebased against master
- Removed default shortcut for switch focus feature
- switch focus between main and splitted window
Please, review the code, let me know any issues you encounter or merge it if you find it OK.
I have also noticed an issue regarding split window plugin. When editing in the splitted window editor, opening and closing braces, parentheses, brackets,... pairs are not being highlighted as they are in the main editor. I guess this deserves a separate issue and PR.
--
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/631#issuecomment-383013988