Timestamp Keyboard Shortcut In gedit
I do not know why this was such a hard problem to find a solution to given that the solution I arrived at was extremely simple.
On multiple teams I work with, we have a need to take timestamped notes of our actions. Often we are operating on locked down systems without Internet access that would allow us to install plug-ins that do this sort of thing. I needed a way to insert a timestamp in gedit
using just the basic default functionality and I finally have my solution.
- Open
gedit
, go to Preferences > Plug-ins and enable the "External Tools" plug-in.
- Next, go back to the
gedit
menu and select "Manage External Tools"
- Click the small
+
sign at the bottom left to add a new function. - Name the function and input the shell script/command that you want. In my case for the timestamp I simply used
date --rfc-3339=s
. - Click in the "Shortcut Key" box to map a new key combo (seems like
gedit
does not allow single key mappings). - For my purposes, the only other setting I needed was to 'Insert at cursor position'.
Now I have easy access timestamps for my notes without needed additional plug-ins or other tools.