 
 ;; Org-mode tables are best without truncation, but prose looks best with.
 (global-set-key (kbd "<f1>") 'toggle-truncate-lines)
+;; Insert current time
+(global-set-key (kbd "<f2>") 'esel/now)
 
 (menu-bar-mode -1)
 (tool-bar-mode -1)

(add-hook 'c-mode-common-hook
          (lambda() (local-set-key  (kbd "C-c o") 'ff-find-other-file)))

;; Set ggtags keybindings
(define-key ggtags-mode-map (kbd "C-c g s") 'ggtags-find-other-symbol)
(define-key ggtags-mode-map (kbd "C-c g h") 'ggtags-view-tag-history)
(define-key ggtags-mode-map (kbd "C-c g r") 'ggtags-find-reference)
(define-key ggtags-mode-map (kbd "C-c g f") 'ggtags-find-file)
(define-key ggtags-mode-map (kbd "C-c g c") 'ggtags-create-tags)
(define-key ggtags-mode-map (kbd "C-c g u") 'ggtags-update-tags)
(define-key ggtags-mode-map (kbd "M-,") 'pop-tag-mark)

;; https://www.masteringemacs.org/article/my-emacs-keybindings
(global-set-key (kbd "C-x C-b") 'ibuffer)
(global-set-key (kbd "<S-C-left>") 'shrink-window-horizontally)

  (if (find-file (ido-completing-read "Find recent file: " recentf-list))
      (message "Opening file...")
    (message "Aborting")))

(defun esel/now ()
  "Insert string for the current time formatted like '[HH:MM]'."
  (interactive)
  (insert (format-time-string "[%H:%M] ")))
