Hi :smiley: I've added a keybinding for switching focus to the split window editor (in case it's enabled). This solves #631 I've set F3 as keybinding by default because: 1. Follows the idea of the other "Focus Keybindings" family: F2 -> Switch to Editor, F4 -> Terminal, F7 -> Search bar 2. Doesn't collides with any other default keybindings and has very few possibilities of collision with user-defined keybindings. 3. Even in the case it collides with other user-defined keybinding, it's not a big deal since it just grab the focus on split window only in the case it's being displayed. If user doesn't like it, he/she can always change this. 4. It's a plugin shipped along with geany. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/721
-- Commit Summary --
* Keybinding for switching focus to splitwindow. Fix #631
-- File Changes --
M plugins/splitwindow.c (16)
-- Patch Links --
https://github.com/geany/geany/pull/721.patch https://github.com/geany/geany/pull/721.diff
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/721
meanwhile a new splitwindow implementation is accepted or not, is there any inconveniences to merge this??
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/721#issuecomment-156865315
@Akronix pushed 250 commits.
c328051 Some adjustmenys in javascript keywords: Deleted 'each' from secondary keywords 59935a3 Merge pull request #1356 from b4n/snippets-keybindings-signature c698469 Removed 'alert' from secondary keywords since it depends on a DOM environment 00a3aef Merge pull request #1361 from Akronix/keywords-js.filetypes 38d5983 Update Catalan translation (#1375) 0df7d5a scintilla: Prevent running signal handlers on a destroyed a11y object 67d6562 Fix cut and copy actions in non-Latin keyboard layouts 2c1a71a Use :select/:deselect signals for consistency b0f71a1 Merge branch 'Forkest/copy-items-nonlatin' 170ebf6 scintilla: Fix build with older GCC 7347631 Fix setting menu item labels dynamically ed46b65 Avoid gdk_display_get_name() on OS X f096fa2 Small update of German translation 2219ab7 Update Scintilla to version 3.7.3 93f2734 Update for new Scintilla styles 9a230e1 Fix search history filling on GTK >= 3.20 ed4fd6a Update po-files for string freeze of Geany 1.30 0b85db4 GTK: Fix double scrolling under X11 1c2d35a Solved spanish fuzzy translation for Geany 1.30 (#1408) 7b09180 api: new function geany_api_version f4c3363 Update of Portuguese translation 7125769 Update NEWS df05fc8 Update NEWS 1421a3f scintilla: Fix crash after destroying the widget on GTK < 3.3.6 b07c8b0 Merge branch 'scintilla/update-373' 6d00622 Scintilla: speed up converting byte offsets to character offsets 3b105ec Merge pull request #1404 from b4n/search/gtk-3-20-history b7900b3 Merge pull request #1399 from techee/osx_start a32ee97 Set language metadata in header of some po files 8001086 Fix po creation time meta data cc7f7f7 Merge pull request #1406 from kugel-/for-upstream 94620f4 updated it.po (#1405) 3838a08 There was also an it.po update for 1.30 fc6f3ff Update copyright years 344de2d Remove faulty empty lines 5a7a308 Set release date 7ccd37b Update NEWS preparing for next release 119f05e Small update of the French translation a15dcc3 Finish updating NEWS 3303bde Post release version bump 994cb47 Update of Slovak translation (#1424) 709acc0 Update of Spanish translation 2a2b8d1 Small update of German translation 7514212 GTK: Fix popup positioning on monitors not positioned at 0,0 ffb71f9 Update of Greek translation 2414029 Bump version in preparation for 1.30.1 03ee2e2 GTK: Fix popup positioning on monitors not positioned at 0,0 420c109 Update NEWS ec1bde0 Update of Slovak translation (#1424) 8d88401 Update of Spanish translation b4eb662 Small update of German translation 6e0e6a4 Update of Greek translation 28b0467 Update NEWS for 1.30.1 for backported translations be91746 Update Catalan translation (#1432) 231e29c Update Catalan translation (#1432) aada81e Update NEWS and cleanup a unneeded fuzzy string inside Catalan translation 1aa82c3 Add a script to fixup copyright years translations def32ab Fixup copyright years translations 79f9a71 Unfuzzy strings that were only marked as such because of years update 0dd1306 Merge pull request #1433 from b4n/po/copyright-years a1929f1 Set release date 46812c4 Fix scripts/set-release-date when LC_TIME is set 4f388e5 Backmerge bugfix release branch 1.30 from 1.30.1 to master 6e1a163 Update bugtracker URL to github 06f70e5 Catalan translation: use unique accelerator keys for menus (#1434) 33762f5 Add parfor to Matlab keyword list (#1021) d34ebce Update Catalan translators (#1440) 2386153 Fix the typo in Kazakh translation (#1447) ce28409 Handle continuous G_IO_IN-s without any data 5539c3f Update status bar after clicking detect indent type menu item 2707006 Fix crash when plugin_set_key_group() is called several times by plugins (#1426) 673a714 Fix the maximum number of G_IO_IN-s without any data 6f69211 C: Fix line continuation handling (#1370) c296efe fix typo in russian translation (#1474) dbcf456 Update HACKING (#1479) 1a19b39 Read stdout/stderr in a loop when using timeout callbacks 9f4407c Add `require_relative` in ruby syntax highlighting (#1472) fefc3a5 Explain the behavior of search keybindings regarding word boundaries (#1478) 8425371 Haxe: Update keywords (#1216) 1305b43 Update Indonesian translation (#1501) fbe6106 Fix comment/uncomment keyboard shortcut for Arduino filetype (#1510) 174fac7 Update po-files for string freeze of Geany 1.31 4406ccf Cmake and Csharp Keywords (#1315) 1d100ae Update of Japanese translation 35a5d45 Update of Lithuanian translation 4f1b2a0 Fix converting color to hex for insertion 71b8fea Update NEWS 7027377 Update HTML keywords (#1530) e185f47 Merge pull request #1536 from vfaronov/fix-color-chooser 30f23bb Add recently merged PRs to NEWS b2b8135 Python: Don't highlight sub-identifiers as keywords 4af5553 Set release date 2d9f97d Post release version bump 75a69aa Added option to auto reload files changed on disk (#1246) c03af5b Python: Remove obsolete lexer property 8b25d09 Cython: Inherit lexer properties from the Python filetype 088aaef Merge pull request #1544 from b4n/python/sub-identifiers 2abf72a Push current position to navqueue before navigating back (#1537) e0dd1ee Added missing PHP keywords, especially for PHP 7.x. (#1547) b2668da Better snippets (#1470) 1836046 Update Scintilla to version 3.7.5 (#1503) 18d5245 editor: fix incorrect variable reference 03e5bb9 Fix crash if plugin manager is opened more than once (#1564) df2a99f a little typo in the list of translators (#1565) 59e6a8c Add missing string and comment styles for various lexers (#1502) 08e2714 Add an editor option to enable IME's candidate window display inline, b7c4bb0 Create correct path for filetype config files 3718101 Remove redundant SSM macros 6c6eccd Check Scintilla status in debug builds 6d663cb Change all scintilla_send_message calls to use SSM macro f90ebaf Improve Scintilla status messages output bc7e64f Fix message formatting string 169feae api: export tm_tag_get_type() 745f424 Export keybindings_load_keyfile() for plugins 38147b2 Added an option to save/reload either window position or 180e1da api: the commits 745f424 and 169feae should have incremented the API version, do so now e43c8d8 Always emit the project-save signal when writing project file 3e86431 filebrowser: Don't change directory on project save a408230 Add "Close Documents to the Right" feature ea217b7 Update HACKING for best practices (C99) 092f2a9 Fixups fd38a49 Add note about data types to HACKING a108f91 Re-enable SIGTERM handling 7261742 Allow plugins to get the data they set 4a60cdd Add utils_get_real_path() and use it 44f96d0 Mark tm_get_real_path with G_DEPRECATED_FOR adc22a4 bash may not found in the system (#1574) 3ffc577 Mark a local function static f1b84c9 Mention G_GNUC_UNUSED macro. (#1582) 0dc1e4c Change wordorder on Russian translation to fit with actual meaning of button 76c69a9 Add GNU assembler extensions 6522332 Fix the symbols tree hierarchy when several tags have the same name b1e0d09 Fix a typo (#1597) 87b7e3c Add Latvian translation fda8b97 Keep the current tab when closing documents to the right of another tab 198a0cf Update a comment to better reflect the internal data changes 05fce1a Move some functions from tm_tag to tm_parser namespace 0e26c72 Update of German translation b4415b1 Update of Swedish translation 3fb94c2 Use non-symlinked VTE libraries on macOS (#1625) 83e8ae1 Make sure GDK_MOD2_MASK is cleared when getting modifiers deff041 Make translation of a string consistent in German translation Fixes #390 9185395 Merge pull request #1636 from techee/kb_osx_fix 960a0d5 Improve CLI argument help 9589743 Remove redundant and erroneous file patterns from Doxygen 7d53e1c Add a note for applying the indent settings in the project preferences fca450e Update of French translation (#1653) a1991c4 Use utility function to get a file URI prefix cb669e2 Use utils_get_uri_file_prefix() as file URI prefix b305936 Update of Latvian translation 47cfe3e Update po-files for string freeze of Geany 1.32 a8512a2 Update of German translation 2c8f754 Merge pull request #1667 from eht16/issue1018_win_execute_builtin_path 393cdb3 Update of Slovak translation (#1673) e7b4c34 Small update of Italian translation 26f8539 Update of Catalan translation bc39afa Update of Portuguese translation 687813b Sync NEWS-file with update translations for 1.32 54a9868 Update of Dutch translation. (#1674) d1cdfe0 Update zh_CN.po (#1677) fdaabd4 updated lithuanian trasnlation (#1676) f770ff3 Update NEWS b54a117 updated it.po (#1680) dd58ab6 Make Python comment hash space (#1682) a14adc7 Reword two phrases in German translation (#1686) 66abc60 Update of Spanish translation b0d3b5e Close "Deleted from Disk" Infobar on Reload. (#1628) 667d0b5 Fix indentation 4a5ccf7 Fix backward compatibility of the geometry saving setting 2698562 Update of Greek translation 525952c Update NEWS for 1.32 918b5f0 Set release date 80f33c8 Remove spurious colon ca16aff Post release version bump bd22fef CSS: Update Grid properties 419550a Add a tooltip showing the full path on menu items representing documents 4a304e9 Fix critical when right-clicking on the document notebook outside a tab f5fe073 Merge pull request #1706 from b4n/document-items-tooltip 39b894c Simplify confusing plugin howto code example 22fd1cb Update Polish translation (#1721) 60b9310 Fix Polish assembly translation (#1722) 69a537d Merge pull request #1598 from b4n/symbols/more-robust-hierarchy a46d875 Merge pull request #1650 from b4n/project-indent-settings-note 63850b3 Fix pointer and character constant comparison dbd0573 Fix comparison between signed and unsigned integers 81144dc Fix missing initializer for field warnings 243d55f Fix missing initializer for field warnings in parsers bf28794 Adjust 'fall through' comments to be recognized by GCC 43122ea Add more 'fall through' comments for switch cases 36f4474 Remove some unused variables 1b5deea Fix comparison between signed and unsigned integers fce5862 Add 'fall through' comments and fix actual bug c61bc67 Work around a `-Wformat-overflow` warning 681c138 Work around potentially uninitialized variable warning 1f71ccd Enable popup menu on sidebar and message window notebooks (#1726) 01b0fc6 Show status message on attempt to execute empty context action. 385fff7 Merge pull request #1642 from LarsGit223/NoActionCmd 6b973bc Theme improvements (#1382) 7e1ab31 Return GdkColor via out parameter rather than return value 6622574 Fix double context menu in Terminal tab cc035ab Merge branch 'gcc-warnings' 6509720 TravisCI: Remove requirement to fail build on aggregate return (#1740) c3c1921 Small update of German translation 16020dd Add cast to `GtkWidget*` to match previous behaviour cb84d1b Small update of Russian translation (fix fuzzy-string and other) (#1761) 8076b0d Make po files update for string freeze of Geany 1.33 69dd829 Update of Slovak translation (#1769) 58aa099 Update of Spanish translation (#1771) d94b4b8 Update of Portuguese translation f4f6ea8 Update NEWS for 1.33 with updated trnaslation for now 27fd8c2 Small update of the French translation d109311 Update of Latvian translation fd1d35f Update of Spanish translation e5accd6 Update zh_CN.po (#1773) d0ecf3c Updated tr.po - Fixed some misspellings (#1775) 68090b9 Update of Greek translation f50e36e Update NEWS with recent translations 7d2e618 Mention GTK 3 for the first time (#1780) d61b2b9 Update NEWS for 1.33 b1ef8f0 Set release date 1bc1227 updated it.po for 1.33 (#1783) e001518 Add last minute update of Italian translation 6325759 Merge branch 'master' of github.com:geany/geany 6c531e7 Post release version bump 824b2cb Update copyright years bcc8e70 Small fix of Russian translation (#1770) 045a92a Update of Japanese translation 51d815f Add missing space in string. Fixes #1789 65a156f Remove a space (#1790) 09a1f9d Add Danish translation 5a2f4b4 Remove a double space in a string 29d14b1 Merge pull request #1461 from zhekov/master 175e45a spawn: Add debugging information when switching to timeout source 99150b0 Check plugin actually has a help function before invoking it 373852c Fix plugin manager UI synchronization on double click e4bc8c3 Update of Swedish translation 08a60e3 spawn: Changed confusing macro name, fixes #1256 7fd73a0 keyfile: Output unescaped filename if session file cannot be opened 6e4eece manual: added documentation about replacement of 'untitled.ext' with filename (#1804) 7c6b479 Small update of German translation 11da555 Skip the format specifier when loading a global tag file 4d252c7 Merge pull request #1799 from b4n/plugin-manager/selection-on-double-click d3417b7 api: add non-variadic variants of msgwin_*_add to the API cb17994 msgwin: beautify doxygen comments a bit 78644a8 msgwin: improve doxygen comments bec3832 Bump API version 1611e3f Merge pull request #1748 from kugel-/msgwin-api 2aabff9 Keybinding for switching focus to splitwindow. Fix #631 3325b51 Rebased with master as of today f9cf33c Improvements on switch focus feature for the split window plugin.
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.
elextr commented on this pull request.
@@ -468,6 +492,8 @@ void plugin_init(GeanyData *data)
0, 0, "split_vertical", _("Top and Bottom"), menu_items.vertical); keybindings_set_item(key_group, KB_SPLIT_UNSPLIT, kb_activate, 0, 0, "split_unsplit", _("_Unsplit"), menu_items.unsplit); + keybindings_set_item(key_group, KB_FOCUS_SPLIT_WINDOW, kb_activate, + 0, 0, "focus_split_window", _("Switch focus between windows"), menu_items.switch_focus);
what about giving it a mnemonic, maybe f for focus?"
PR looks ok, can't test right now.
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.
Check its not already an issue, and then you can make one to record the problem, but its unlikely to get fixed until a "proper" split window solution is created.
@Akronix pushed 1 commit.
fa26e40 Added keybinding mnemonic to Switch focus.
Akronix commented on this pull request.
No problem. But I'm wondering, what are these mnemonics there for? Because Side by Side and Top and Bottom do not have.
@@ -468,6 +492,8 @@ void plugin_init(GeanyData *data)
0, 0, "split_vertical", _("Top and Bottom"), menu_items.vertical); keybindings_set_item(key_group, KB_SPLIT_UNSPLIT, kb_activate, 0, 0, "split_unsplit", _("_Unsplit"), menu_items.unsplit); + keybindings_set_item(key_group, KB_FOCUS_SPLIT_WINDOW, kb_activate, + 0, 0, "focus_split_window", _("Switch focus between windows"), menu_items.switch_focus);
No problem. But I'm wondering, what are these mnemonics there for? Because Side by Side and Top and Bottom do not have.
Mnemonics are an alternate way of operating the menus without a mouse, on Linux systems usually you press `alt` and the key and to have them show as underlined characters. When no mnemonic is set the first character is used, but with your new menu entry `Switch focus` there is a conflict with `Side by side`.
hmm yes, I know what is all the mnemonic all about. But I already set gtk_menu_item_new_with_mnemonic(_("Switch _Focus")); so I do not know what is the mnemonic in keybindings_set_item intended for.
I'm sorry, pressing the alt key on Ubuntu Unity has a rather odd behaviour since it launches the HUD Unity feature, so I don't use mnemonics very often.
hmm yes, I know what is all the mnemonic all about. But I already set gtk_menu_item_new_with_mnemonic(_("Switch _Focus"));
Oh, I put my comment in the wrong place, and probably why I missed you had already done it, never mind cancel that change, sorry.
Sure, but then another question arises, why Unsplit has a _U mnemonic in keybindings_set_item?: https://github.com/geany/geany/pull/721/files#diff-5013916e0dbfaf2f1a5f447b3...
why Unsplit has a _U mnemonic in keybindings_set_item?:
Somebody else made the same mistake as me, mixing up the menu item and the keybinding?
@Akronix pushed 1 commit.
b0183d7 Update splitwindow.c
Removed all mnemonics in calls to keybindings_set_item()
ping
any maintainer could take a look at this, please? @elextr @b4n
@Akronix sorry I still can't test it, maybe someone else can test it and note that it works and doesn't break anything else.
ping! I'm missing this :cry:
github-comments@lists.geany.org