<commit_before>;;; key.el --- For miscellaneous keybindings that don't fit elsewhere

(setq leader "SPC"
      leader-double "SPC SPC"
      fallback-leader "M-SPC"  ; Fallback used when evil is inactive
      fallback-leader-double "M-SPC SPC")

(setq general-default-states '(normal insert emacs))

(defun key/leader-map (&rest maps)
  "Assign the given maps with prefix leader in evil normal mode and
fallback-leader elsewhere."
  (apply 'general-define-key
         :prefix leader
         :non-normal-prefix fallback-leader
         maps))

(defun key/leader-double-map (&rest maps)
  "Assign the given maps with prefix leader in evil normal mode and
fallback-leader elsewhere."
  (apply 'general-define-key
         :prefix leader-double
         :non-normal-prefix fallback-leader-double
         maps))

;; Miscellaneous
(key/leader-map "d" 'switch-to-buffer)

;; File operations
(key/leader-map "f d" 'vc-delete-file
                "f f" 'find-file
                "f r" 'vc-rename-file
                "f s" 'save-buffer)

;; Toggles
(key/leader-map "t h" 'evil-ex-nohighlight
                "t m" 'menu-bar-mode)

(global-set-key (kbd "<f2>") 'lib/echo-major-mode)
(global-set-key (kbd "<f9>") 'lib/open-emacs-config)
(global-set-key (kbd "<f12>") 'list-packages)

(provide 'key)

;;; key.el ends here<commit_msg>Add more keybindings to key.el<commit_after>;;; key.el --- For miscellaneous keybindings that don't fit elsewhere

(setq leader "SPC"
      leader-double "SPC SPC"
      fallback-leader "M-SPC"  ; Fallback used when evil is inactive
      fallback-leader-double "M-SPC SPC")

(setq general-default-states '(normal insert emacs))

(defun key/leader-map (&rest maps)
  "Assign the given maps with prefix leader in evil normal mode and
fallback-leader elsewhere."
  (apply 'general-define-key
         :prefix leader
         :non-normal-prefix fallback-leader
         maps))

(defun key/leader-double-map (&rest maps)
  "Assign the given maps with prefix leader in evil normal mode and
fallback-leader elsewhere."
  (apply 'general-define-key
         :prefix leader-double
         :non-normal-prefix fallback-leader-double
         maps))

;; Miscellaneous
(key/leader-map "d" 'switch-to-buffer)

;; File operations
(key/leader-map "f d" 'vc-delete-file
                "f f" 'find-file
                "f k" 'kill-this-buffer
                "f r" 'vc-rename-file
                "f s" 'save-buffer)

;; Emacs-Lisp-related
(key/leader-map "l e" 'eval-last-sexp
                "l i" 'eval-print-last-sexp)

;; Toggles
(key/leader-map "t h" 'evil-ex-nohighlight
                "t m" 'menu-bar-mode)

(global-set-key (kbd "<f2>") 'lib/echo-major-mode)
(global-set-key (kbd "<f9>") 'lib/open-emacs-config)
(global-set-key (kbd "<f12>") 'list-packages)

(provide 'key)

;;; key.el ends here
{'fraction_non_alphanumeric': 0.13534635879218473, 'fraction_numerical': 0.002841918294849023, 'mean_word_length': 2.695538057742782, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '192397', 'n_tokens_mistral': 988, 'n_tokens_neox': 952, 'n_words': 264}