I love the "goto matching brace" command (ctrl-b), but it's too bad this can't be combined with selecting text.
A "select to matching brace" command would make it super easy to select blocks of code. ctrl-shift-b seems like a intuitive key combo for it.
Some cursor movement can be combined with selecting text, pageup, ctrl-left, etc. Others can't: goto matching brace, goto next marker, etc. Maybe there could be more overall consistency?
Or is there a reason against any cursor movement (while the shift is pressed) changing the selection?
--
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-plugins/issues/840
Had to create the new pull request quickly - not having a huge ctags-related pull request in Geany brings bad luck!
This pull request brings the changes from upstream ctags made in the last 2 years so that parsers are compatible with uctags parsers. This isn't a complete sync to avoid too big pull request, just the minimal changes required so syncing parsers isn't blocked. In addition, to verify that subparser support works, this pull request uses html, javascript and css parsers from upstream and enables subparser support for HTML.
In general most of the patches are fortunately boring, the "interesting" ones are:
8822e4e - using kindIndex instead of kindDefinition. This one took a bit of work and I hope I didn't introduce any problems on the way. In some functions which aren't relevant to Geany I left just function stubs to avoid extra syncing with upstream. This patch also disables regex parsing - the parsing is only disabled inside ctags, I kept the regex parsers there for now until we decide what we want to do about them.
72d4b5d - using upstream javascript parser. I haven't verified completely if the generated tags are correct (seems OK to someone who doesn't really know javascript) but better to check by somebody else.
5de9b3e - Support subparsers in Geany. The biggest part of the patch is additional mapping of subparser tag types to the tag type used by Geany. This is necessary because we don't want subparser tag types to clash with main parser tag types.
I tried to copy all the parsers from upstream to Geany to see if it compiles (I have only tried the compilation part, not if the parsers actually work correctly) and the only ones that didn't compile because of upstream changes were:
1. asm - would need upstream preprocessor.c/h implementation. But it probably wouldn't be hard to convert it to our lcpp.c/h
2. make and tcl parsers - need subparser.c/h and it would require more syncs with upstream
3. c.c and cxx parsers - I haven't actually tried these beasts
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2018
-- Commit Summary --
* Use latest version of htable
* Use latest version of mio
* Use latest version of objpool
* Use latest version of ptrarray
* Use latest version of vstring
* Rename fieldSpec to fieldDefinition
* Rename kindOption to kindDefinition
* Rename kinds field in parserDefinition to kindTable
* Rename structure fields about field in parserDefinition
* Use kindIndex instead of kindDefinition
* Rename roleDesc to roleDefinition
* Add XTAG_ANONYMOUS used by jscript
* Include stdint.h in entry.h
* Don't use hash value as an Anonymous field identifier
* Call anonReset in main part
* Use upstream javascript parser
* Use upstream css parser
* Create correctly sized MIO for 0 size
* Always enable promise API and subparsers for Geany
* Support subparsers in Geany and add HTML parser demonstrating this feature
* Rename truncateLine field of tagEntryInfo
* Add dummy mbcs.h and trace.h
* Introduce an accessor to `locate' field of `Option'
* Add numarray.c/h
* Add getLanguageForFilename() and getLanguageForCommand()
-- File Changes --
M ctags/Makefile.am (7)
M ctags/main/ctags-api.c (10)
M ctags/main/ctags-api.h (1)
M ctags/main/dependency.c (12)
M ctags/main/entry.c (86)
M ctags/main/entry.h (25)
M ctags/main/field.c (63)
M ctags/main/field.h (6)
M ctags/main/htable.c (71)
M ctags/main/htable.h (24)
A ctags/main/inline.h (26)
M ctags/main/kind.c (27)
M ctags/main/kind.h (27)
M ctags/main/lcpp.c (16)
M ctags/main/lcpp.h (2)
M ctags/main/lregex.c (34)
M ctags/main/lxcmd.c (36)
M ctags/main/lxpath.c (15)
A ctags/main/mbcs.h (1)
M ctags/main/mio.c (32)
M ctags/main/mio.h (2)
A ctags/main/numarray.c (175)
A ctags/main/numarray.h (48)
M ctags/main/objpool.c (7)
M ctags/main/objpool.h (5)
M ctags/main/options.c (11)
M ctags/main/options.h (5)
M ctags/main/parse.c (210)
M ctags/main/parse.h (26)
M ctags/main/promise.c (4)
M ctags/main/ptrarray.c (28)
M ctags/main/ptrarray.h (6)
M ctags/main/read.c (12)
M ctags/main/read.h (6)
A ctags/main/trace.h (1)
A ctags/main/trashbox.c (246)
A ctags/main/trashbox.h (41)
M ctags/main/types.h (8)
M ctags/main/vstring.c (59)
M ctags/main/vstring.h (31)
M ctags/main/xtag.c (2)
M ctags/main/xtag.h (1)
M ctags/parsers/abaqus.c (6)
M ctags/parsers/abc.c (6)
M ctags/parsers/asciidoc.c (8)
M ctags/parsers/asm.c (12)
M ctags/parsers/basic.c (12)
M ctags/parsers/c.c (50)
M ctags/parsers/conf.c (10)
M ctags/parsers/css.c (47)
M ctags/parsers/diff.c (6)
M ctags/parsers/docbook.c (6)
M ctags/parsers/erlang.c (12)
M ctags/parsers/fortran.c (14)
M ctags/parsers/go.c (8)
M ctags/parsers/haskell.c (8)
M ctags/parsers/haxe.c (16)
M ctags/parsers/html.c (540)
M ctags/parsers/jscript.c (1209)
M ctags/parsers/json.c (8)
M ctags/parsers/latex.c (10)
M ctags/parsers/lua.c (6)
M ctags/parsers/make.c (8)
M ctags/parsers/markdown.c (6)
M ctags/parsers/matlab.c (8)
M ctags/parsers/nsis.c (10)
M ctags/parsers/objc.c (8)
M ctags/parsers/pascal.c (10)
M ctags/parsers/perl.c (12)
M ctags/parsers/php.c (12)
M ctags/parsers/powershell.c (8)
M ctags/parsers/python.c (28)
M ctags/parsers/r.c (6)
M ctags/parsers/rest.c (8)
M ctags/parsers/ruby.c (14)
M ctags/parsers/rust.c (8)
M ctags/parsers/sh.c (6)
M ctags/parsers/sql.c (8)
M ctags/parsers/tcl.c (6)
M ctags/parsers/txt2tags.c (7)
M ctags/parsers/verilog.c (8)
M ctags/parsers/vhdl.c (10)
M src/tagmanager/tm_parser.c (85)
M src/tagmanager/tm_parser.h (2)
M src/tagmanager/tm_source_file.c (10)
M tests/ctags/Makefile.am (8)
M tests/ctags/complex-return.js.tags (2)
M tests/ctags/js-class-related-unterminated.js.tags (3)
M tests/ctags/js-let.js.tags (2)
M tests/ctags/js-string-continuation.js.tags (2)
M tests/ctags/jsFunc_tutorial.js.tags (10)
M tests/ctags/simple.html.tags (4)
M tests/ctags/simple.js.tags (3)
-- Patch Links --
https://github.com/geany/geany/pull/2018.patchhttps://github.com/geany/geany/pull/2018.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/2018
I am using 1.32 (Ubuntu)
To reproduce:
1) Save a html file
2) Save As js file
bug: The filetype continues html
maybe something like this works:
`diff --git a/src/dialogs.c b/src/dialogs.c
index 7c083512..65721246 100644
--- a/src/dialogs.c
+++ b/src/dialogs.c
@@ -490,6 +490,7 @@ static gboolean handle_save_as(const gchar *utf8_filename, gboolean rename_file)
{
GeanyDocument *doc = document_get_current();
gboolean success = FALSE;
+ GeanyFiletype *ft = filetypes_detect_from_document(doc);
g_return_val_if_fail(doc != NULL, FALSE);
g_return_val_if_fail(!EMPTY(utf8_filename), FALSE);
@@ -511,6 +512,8 @@ static gboolean handle_save_as(const gchar *utf8_filename, gboolean rename_file)
success = document_save_file_as(doc, utf8_filename);
build_menu_update(doc);
+ document_set_filetype(doc, ft);
+
return success;
}
`
--
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/2124
This got broken by 907a79263d907fa354d3b4c6570f33047801dd84 back in 2011 as encoding names started to be compared more permissively, leading to "none" matching the "None" encoding.
This shouldn't be too much of a problem as trying the None encoding first should not cause any issue, but fix loading of the option anyway.
This however won't restore settings from existing configuration files that used the previous code, as there is no way to tell whether the user selected the None encoding voluntarily or not.
---
To reproduce the issue, go to the file preferences, and deactivate the *Use fixed encoding when opening non-Unicode files*. Save the setting, and restart Geany: you'll see the setting is activated again.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1326
-- Commit Summary --
* Fix loading the default open encoding option
-- File Changes --
M src/keyfile.c (4)
-- Patch Links --
https://github.com/geany/geany/pull/1326.patchhttps://github.com/geany/geany/pull/1326.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/1326
Hi, i am a newly geany user.
when i open a plain/txt file that is gbk encoding from file-manager, always show measy characters due to geany default using utf-8.
if i change encoding by the menu 'doc - encodeing - lang ...', geany do not auto-reload the file with the changed encoding. kate editor can do that way.
i know geany how to correctly open non-utf8 txt file, but auto reload when change encoding makes user much simpler. i hope geany have the function.
Regards.
--
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/1529