Tuesday, April 30, 2024
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 20471  / 2 Years ago, sun, august 14, 2022, 2:04:57

Since I spend a lot of time on my laptop, I've gotten used to using keyboard shortcuts for everything. I want to be able to switch from tab to tab of opened documents in gedit by pressing Ctrl+Tab and Ctrl+Shift+Tab. Are there config files I can edit, or is there something else I can do to enable this functionality?



Alternatively, can anyone post a list of keyboard shortcuts in gedit?


More From » shortcut-keys

 Answers
3

There used to be an option to enable editable menu accelerators for GNOME apps. The GNOME team removed the GUI for this, but at least under GNOME 2 it was still available via gconf. Recent Ubuntu versions use GNOME 3; I'm not sure of whether that still works (since GNOME 3 has migrated to dconf). I tried it in the old gconf-editor, and setting the option /org/gnome/desktop/interface/can-change-accels using dconf-editor, but it doesn't seem to work in Gedit (v3.4 on Precise).


According to Where to configure shortcut keys of Nautilus?, it doesn't work with Unity's global menu. You could load a different desktop environment and make the change there (if it works).


It may still be possible to edit the keyboard shortcuts by editing configuration files. According to a commenter on the (very outdated) Gedit shortcuts documentation page:



You don't really need a plugin to change keyboard shortcuts. This
(also) works:


~/.config/gedit/accels:



; gedit GtkAccelMap rc-file         -*- scheme -*-
(gtk_accel_path "<Actions>/GeditWindowActions/DocumentsPreviousDocument" "<Control>Page_Up")
(gtk_accel_path "<Actions>/GeditWindowActions/DocumentsNextDocument" "<Control>Page_Down")
(gtk_accel_path "<Actions>/GeditWindowActions/SearchFindPrevious" "<Shift>F3")
(gtk_accel_path "<Actions>/GeditWindowActions/SearchFindNext" "F3")


~/.config/gtk-3.0/gtk.css:



 @binding-set unbind-ctrl-d {
unbind "<ctrl>d";
unbind "<shift>F10";
unbind "<ctrl>Page_Up";
unbind "<ctrl>Page_Down";
}
GtkTreeView { gtk-key-bindings: unbind-ctrl-d; }
GtkTextView { gtk-key-bindings: unbind-ctrl-d; }

According to one commenter, Ctrl-Tab is hardcoded and cannot be rebound easily, but there is a plugin that purports to do this. To install the plugin, see How do I install a plugin for gEdit v3?.


For gedit2, the plugin files go in ~/.gnome2/gedit/plugins.




If you're unable to get it to work, you could use a different editor that lets you edit shortcuts, such as KDE's Kate.


The list of default keyboard shortcuts in Gedit is available in the manual. Click "Help" > "Contents" > "Shortcut keys" in Gedit to access it.


[#33945] Monday, August 15, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
housecoarmer

Total Points: 434
Total Questions: 116
Total Answers: 120

Location: Albania
Member since Sun, Nov 22, 2020
4 Years ago
;