From 9ae71ab6cc3bb8185939e1536ffba41beb896686 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Thu, 17 Nov 2011 15:58:27 +0000 Subject: [PATCH] Add default keybindings for Go to Tag, remove Transpose default This does not affect existing users. Ctrl-T Go to tag definition Ctrl-Shift-T Go to tag declaration A default keybinding for 'Transpose current line' is no longer necessary as it does the same as 'Move line(s) up', which we now have a default for. --- doc/geany.html | 8 ++++---- doc/geany.txt | 6 +++--- src/keybindings.c | 8 +++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/geany.html b/doc/geany.html index 3350b25a..b8587f41 100644 --- a/doc/geany.html +++ b/doc/geany.html @@ -3731,7 +3731,7 @@ end of the current line. Duplicates the current line or selection. Transpose current line -Ctrl-T +  Transposes the current line with the previous one. Scroll to current line @@ -4181,7 +4181,7 @@ marker if there already is one. Goto the previous marker in the current document. Go to tag definition -  +Ctrl-T Jump to the definition of the current word (near the keyboard cursor). If the definition cannot be found (e.g. the relevant file is not open) Geany @@ -4189,7 +4189,7 @@ will beep and do nothing. See the section called Go to tag definition. Go to tag declaration -  +Ctrl-Shift-T Jump to the declaration of the current word (near the keyboard cursor). If the declaration cannot be found (e.g. the relevant file is not open) Geany @@ -6725,7 +6725,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.

diff --git a/doc/geany.txt b/doc/geany.txt index 99a8dae0..3a429270 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -3240,7 +3240,7 @@ Delete to line end Ctrl-Shift-Delete Deletes from the curre Duplicate line or selection Ctrl-D Duplicates the current line or selection. -Transpose current line Ctrl-T Transposes the current line with the previous one. +Transpose current line Transposes the current line with the previous one. Scroll to current line Ctrl-Shift-L Scrolls the current line into the centre of the view. The cursor position and or an existing @@ -3489,13 +3489,13 @@ Goto next marker Ctrl-. Goto the next marker i Goto previous marker Ctrl-, Goto the previous marker in the current document. -Go to tag definition Jump to the definition of the current word (near +Go to tag definition Ctrl-T Jump to the definition of the current word (near the keyboard cursor). If the definition cannot be found (e.g. the relevant file is not open) Geany will beep and do nothing. See the section called `Go to tag definition`_. -Go to tag declaration Jump to the declaration of the current word (near +Go to tag declaration Ctrl-Shift-T Jump to the declaration of the current word (near the keyboard cursor). If the declaration cannot be found (e.g. the relevant file is not open) Geany will beep and do nothing. See the section called diff --git a/src/keybindings.c b/src/keybindings.c index 8d759b7a..730bef57 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -290,7 +290,7 @@ static void init_default_kb(void) _("Delete to line end"), NULL); /* transpose may fit better in format group */ keybindings_set_item(group, GEANY_KEYS_EDITOR_TRANSPOSELINE, NULL, - GDK_t, GDK_CONTROL_MASK, "edit_transposeline", _("_Transpose Current Line"), + 0, 0, "edit_transposeline", _("_Transpose Current Line"), LW(transpose_current_line1)); keybindings_set_item(group, GEANY_KEYS_EDITOR_SCROLLTOLINE, NULL, GDK_l, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "edit_scrolltoline", _("Scroll to current line"), NULL); @@ -461,9 +461,11 @@ static void init_default_kb(void) GDK_comma, GDK_CONTROL_MASK, "edit_gotopreviousmarker", _("_Go to Previous Marker"), LW(go_to_previous_marker1)); keybindings_set_item(group, GEANY_KEYS_GOTO_TAGDEFINITION, NULL, - 0, 0, "popup_gototagdefinition", _("Go to Tag Definition"), LW(goto_tag_definition1)); + GDK_t, GDK_CONTROL_MASK, "popup_gototagdefinition", + _("Go to Tag Definition"), LW(goto_tag_definition1)); keybindings_set_item(group, GEANY_KEYS_GOTO_TAGDECLARATION, NULL, - 0, 0, "popup_gototagdeclaration", _("Go to Tag Declaration"), LW(goto_tag_declaration1)); + GDK_t, GDK_CONTROL_MASK | GDK_SHIFT_MASK, "popup_gototagdeclaration", + _("Go to Tag Declaration"), LW(goto_tag_declaration1)); keybindings_set_item(group, GEANY_KEYS_GOTO_LINESTART, NULL, GDK_Home, 0, "edit_gotolinestart", _("Go to Start of Line"), NULL); keybindings_set_item(group, GEANY_KEYS_GOTO_LINEEND, NULL,