Timestamp Keyboard Shortcut In gedit

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.

  1. Open gedit, go to Preferences > Plug-ins and enable the "External Tools" plug-in.
    Screenshot-from-2018-06-19-12-22-17
  2. Next, go back to the gedit menu and select "Manage External Tools"
    Kali-Linux-2017.1-vm-amd64-2018-06-19-12-24-51
  3. Click the small + sign at the bottom left to add a new function.
  4. 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.
  5. Click in the "Shortcut Key" box to map a new key combo (seems like gedit does not allow single key mappings).
  6. For my purposes, the only other setting I needed was to 'Insert at cursor position'.
    Screenshot-from-2018-06-19-12-29-03

Now I have easy access timestamps for my notes without needed additional plug-ins or other tools.