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
Consume closing brackets, braces, parenthesis, single and double quotes #2122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the manual as well.
Did you use glade 3.8.5/6 to update geany.glade?
scintilla/include/Scintilla.h
Outdated
@@ -49,6 +49,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, | |||
#define SCI_CHANGEINSERTION 2672 | |||
#define SCI_CLEARALL 2004 | |||
#define SCI_DELETERANGE 2645 | |||
#define SCI_DELETECHAR 2719 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything in the scintilla directory comes from upstream, it will be overwritten next time its updated from upstream, so you need to get the changes into upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I didn't know and in first place it was not obvious to me
scintilla/src/Editor.cxx
Outdated
return 0; | ||
|
||
case SCI_DELETECHAR: | ||
pdoc->DelChar(static_cast<Sci::Position>(wParam)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also from upstream.
src/sciwrappers.c
Outdated
@@ -227,6 +227,15 @@ void sci_add_text(ScintillaObject *sci, const gchar *text) | |||
} | |||
} | |||
|
|||
void sci_delete_char(ScintillaObject *sci, const gint pos) | |||
{ | |||
SSM(sci, SCI_DELETECHAR, pos, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you add this? Why not just use DELETERANGE with length 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, same as before. Didn't know it.
Have you tried the autoclose plugin? |
Ok, I will I edited it as a textfile since my glade is 3.22. I didn't want to break anything and switching to an older glade was not in my scope |
No, I didn't. But now I see this does it very well. |
doc/geany.txt
Outdated
@@ -2246,6 +2246,10 @@ Single quotes ' ' | |||
Double quotes " " | |||
Auto-close double quotes when typing an opening one | |||
|
|||
For a more fluent writing one can also activate that Geany checks if the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure "fluent" will be correctly understood, maybe just say to avoid having to move your typing hand off the keyboard to the arrow keys as you explained in the issue description.
And apparently "Fluent" is a type of coding paradigm in C#.
@jeremiaskleer its the normal policy of Geany to not accept hand edits to And yes I totally agree with you about needing to compile your own Glade 3.8.5 or 3.8.6, I won't either, but until support for GTK2 is removed from Geany, the Glade version can't be advanced to one thats available in repositories. But since the functionality is available in the "autoclose" plugin there may not be much incentive to add this, but lets see if anybody tests it and reports its working. |
It's even easier to compile than Geany.
That's not true, if we advance the Glade version, it will still be stuck at a different version, which is unlikely to be the same version as found in <your distro> repositories. It has nothing to do with GTK+ version but rather that the output from Glade is unstable, even between minor versions. |
I tried compiling glade 3.8.6 with no success within 1 hour. I stopped. Maybe someone already having glade in correct version could help. I don't agree with the last point: I see no reason for not fixing a feature in Geany, in my opinion not usable, because it can be circumvented with a plugin, although there is a easy fix, already prepared. |
For a fluent coding I love to not change my hand position to use the
arrow keys!
I realy like auto-closing.
If I activate the auto closing brackets, braces, parenthesis and
quotes feature, the closing characters are inserted, but to continue after
these, the arrow keys are necessary.
The modification I made: if autoclosing AND consuming is activated in
options, if a closing character is typed and the following character
matches this, not both characters stay - one deleted - curr pos
afterwards.
Example: the | marks the curr position:
"|"
"hallo|"
[Then the " is hit]
"hallo"|
The " is reachable without changing hand pos. Same for the other
"autoclosers".
I saw this in other IDEs and I want it in my Geany.
I don't know about internationatlization, so this is an incomplete
feature.