it does vary from time to time
I /could/ talk all day about Emacs, but it's a lot easier for you to get an idea how I use it by just looking at my .emacs
file. Rather than explaining too much, let me just dive right in.
Revision history
I started late last year adding a revision history to my .emacs file. Like most power users, I used to declare Emacs "bankrupcy" from time to time and start over with a blank slate. This last few updates, though, I've saved a lot of stuff, because it's working well for me. In early February, I decided to let ChatGPT see what it could recommend for configuration. It gave me lots of stuff -- not all of it working elisp code, by any means, and its explanations were often just plain wrong -- but it was just a way to branch out a little and change my approach a bit.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; .emacs file for billwear ;; ;; wowear@gmail.com, billwear.github.io ;; ;;--------------------------------------;; ;; revision history ;; ;; - - - - - - - - - - - - - - - - - - -;; ;; 29Dec24 09:53 major upgrade ;; ;; - - - - - - - - - - - - - - - - - - -;; ;; 07Feb25 13:00 AI-assisted updates ;; ;; - - - - - - - - - - - - - - - - - - -;; ;; 08Feb25ff rebuild on PRN basis ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Since I started programming in BCPL, then B, and later C, putting function definitions above the first point of use is an old habit. Yes, I'm that old. Don't knock it; proud to still be kicking and writing technical documentation full time for money.
These are normally in alpha order (again, old programming habits die hard, or never), but I've regrouped them for the purposes of coherent discussion.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; U S E R F U N C T I O N S ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
These three functions allow me to use Emacs on any device where I can run git
and the Emacs binary itself. This includes my Android phone, running the F-droid version of Termux.
My entire home directory (everywhere) is actually a git
repository, with reasonable exclusions for three types of things:
- Files and directories specific to the local system's OS.
- Things that are already part of another
git
repo. - Things that don't need to be backed up on a repo, because they take up way too much disk space (like photographs, backed up to external drives) or because they're too personal to even commit (like my tax returns).
To deal with these, I consolidate them into a few directories and then use the .gitignore
file to keep them from getting backed up with my homedir.
For those who wonder, you can turn any directory into a git repo; just work from the remote first.
Here's how these three functions work:
-
my/pull-homedir-on-startup
updates my homedir when Emacs starts; this may or may not pull updates to.emacs
in time, so sometimes, I have to restart Emacs once. Rarely happens, tho. This function is linked to the startup hook. -
my/git-auto-sync
is run on a timer (currently just a few minutes). Since it'sgit
, I can always back out if I didn't want to save those changes. This function makes it possible for me to walk away, given that it does a full save with(save-some-buffers ...)
before committing. I can get up from my desk at 6 PM, walk away, and within no more than 10 minutes, access what I was just working on from whatever devices are set up to use the repo. -
my/commit-homedir-on-shutdown
puts things away every time I shut down Emacs, or I should say correctly, every time Emacs shuts down in a controller manner.
(defun my/pull-homedir-on-startup () (let ((default-directory "~/")) (condition-case err (progn (shell-command "git pull")) (error (message "Error during git pull: %s" (error-message-string err)))))) (defun my/git-auto-sync () "Attempt to push local changes to the main branch" (interactive) (save-some-buffers t) (let ((default-directory hdir)) (shell-command "git add .") (shell-command "git commit -m 'pre-sync autocommit'") (shell-command "git push"))) (defun my/commit-homedir-on-shutdown () (save-some-buffers t) (let ((default-directory hdir)) (condition-case err (progn (shell-command "git add .") (shell-command "git commit -m 'init6 autocommit'") (shell-command "git push")) (error (message "Error during save and commit: %s" (error-message-string err))))))
The next block of functions are just
(defun my/copy-current-line () "Copy the current line to the kill ring without selecting it." (interactive) (kill-new (thing-at-point 'line t)) (message "Copied line.")) (defun my/display-fkey-help () "open the .emacs.keys file" (interactive) (find-file "~/.emacs.keys")) (defun my/draw-ascii-box-around-region (start end) "Draw an ASCII box around the selected region." (interactive "r") (let* ((text (buffer-substring start end)) (lines (split-string text "\n")) (max-length (apply 'max (mapcar 'length lines))) (border (concat "+" (make-string (+ max-length 2) ?-) "+"))) (delete-region start end) (insert (concat border "\n" (mapconcat (lambda (line) (format "| %s%s |" line (make-string (- max-length (length line)) ? ))) lines "\n") "\n" border "\n")))) (defun my/edit-init () "open the user's init file." (interactive) (find-file user-init-file)) (defun my/grep-thru-homedir (search-term) "Prompt for a SEARCH-TERM and perform rgrep in a fixed directory. If the wildcard 'all' is specified, search through all files." (interactive (list (read-string "Enter search term: "))) (let* ((fixed-directory "/home/stormrider") (file-pattern (if (string= search-term "all") "*.*" ;; Match most files "*"))) ;; Default to searching all files (rgrep search-term file-pattern fixed-directory))) (defun my/indent-entire-buffer () "Indent the entire buffer." (interactive) (indent-region (point-min) (point-max))) (defun my/insert-date-and-time () "Insert the current date and time in ISO format." (interactive) (insert (format-time-string "%Y-%m-%d %H:%M:%S (%s)"))) (defun my/insert-time () "Insert the time only" (interactive) (insert (format-time-string "%H:%M"))) (defun my/insert-time-and-epoch () "Insert the time and the unix epoch" (interactive) (insert (format-time-string "%H:%M (%s)"))) (defun my/insert-markdown-link () "Insert a Markdown link using the clipboard URL." (interactive) (let ((url (current-kill 0))) (insert (format "[%s](%s)" (read-string "Enter link text: ") url)))) (defun my/insert-shell-command-results (command) "Run a shell COMMAND and insert its output at point." (interactive "sShell command: ") (insert (shell-command-to-string command))) (defun my/insert-shell-command-results-in-temp-buffer (command) "Run a shell COMMAND and display the output in a new buffer." (interactive "sShell command: ") (let ((output (shell-command-to-string command))) (with-current-buffer (get-buffer-create "*Shell Output*") (erase-buffer) (insert output) (display-buffer (current-buffer))))) (defun my/mark-done-and-reset-agenda () "agenda auto t-s-r" (interactive) (org-agenda-todo) (org-agenda-redo) (org-save-all-org-buffers)) (defun my/open-todays-org-journal-entry () "Create or open today's journal entry, inserting headers if necessary." (interactive) (require 'org-journal) ;; Ensure org-journal is loaded (let ((today-file (ignore-errors (org-journal--get-entry-path)))) (if (and today-file (file-exists-p today-file)) (org-journal-open-current-journal-file) (progn (org-journal-new-entry t) (let* ((date-output (or (string-trim (shell-command-to-string "date")) "Date Unavailable")) (ddate-output (or (string-trim (shell-command-to-string "ddate")) "Ddate Unavailable")) (fortune-output (or (string-trim (shell-command-to-string "fortune")) "No fortune available"))) (insert (format "\n%s\n%s\n%s\n\n" date-output ddate-output fortune-output))))))) (defun my/run-bash-ansi-term () "Open an ansi-term running bash." (interactive) (ansi-term "/bin/bash")) (defun my/show-agenda-plus-todos () "Open the custom Org agenda view associated with the key 'n'." (interactive) (org-agenda nil "n")) (defun my/show-message-buffer () "Open the *Messages* buffer." (interactive) (switch-to-buffer "*Messages*")) (defun my/uncapitalize-region (start end) "Uncapitalize all words in the selected region." (interactive "r") (let ((text (buffer-substring start end))) (delete-region start end) (insert (downcase text)))) (defun my/view-homedir-dired () "Open dired in tree view." (interactive) (dired "~/")) (defun my/wrap-region-as-markdown-code-block () "Wrap the selected text in Markdown code block." (interactive) (let ((text (buffer-substring (region-beginning) (region-end)))) (delete-region (region-beginning) (region-end)) (insert " '''nohighlight\n " text "\n'''\n"))) (defun my-compare-docs (disc-buffer lp-buffer) "Run ediff between Discourse and Launchpad buffers." (interactive "bDiscourse Buffer: \nbLaunchpad Buffer: ") (ediff-buffers disc-buffer lp-buffer)) (defun my-create-safety-branch (topic-id) "Create and switch to a safety branch." (interactive "nEnter Discourse Topic ID: ") (my-update-git-master) (let ((branch-name (my-generate-branch-name topic-id))) (my-run-git-in-repo "checkout" "-b" branch-name) (message "Switched to safety branch: %s in %s" branch-name my-git-root) branch-name)) (defun my-diff-and-cleanup-branch (branch-name) "Check for differences and delete the branch if unnecessary." (interactive "sBranch name: ") (if (zerop (shell-command "git diff --quiet HEAD")) (progn (my-run-git-in-repo "checkout" "master") (my-run-git-in-repo "branch" "-D" branch-name) (my-run-git-in-repo "push" "origin" "--delete" branch-name) (message "Branch %s was unnecessary and deleted." branch-name)) (message "Changes detected—keeping branch %s." branch-name))) (defun my-fetch-discourse-markdown (topic-id buffer-name) "Fetch raw Markdown from Discourse into BUFFER-NAME." (interactive "nEnter Discourse Topic ID: \nBBuffer Name: ") (let* ((topic-url (format "%s/t/%d.json?api_username=%s&api_key=%s" my-discourse-base-url topic-id my-discourse-api-username my-discourse-api-key)) (buffer (get-buffer-create buffer-name))) (request topic-url :parser 'json-read :success (cl-function (lambda (&key data &allow-other-keys) (let ((markdown-content (cdr (assoc 'raw (aref (cdr (assoc 'posts (assoc 'post_stream data))) 0))))) (with-current-buffer buffer (erase-buffer) (insert markdown-content)) (message "Fetched Markdown for topic %d into %s" topic-id buffer-name))))))) (defun my-generate-branch-name (topic-id) "Generate a safety branch name using the topic ID and Unix epoch time." (let ((epoch-time (string-trim (shell-command-to-string "date +%s")))) (format "%s-%s" topic-id epoch-time))) (defun my-git-commit-and-push (commit-message) "Commit and push changes to Git." (interactive "sEnter commit message: ") (my-run-git-in-repo "add" ".") (my-run-git-in-repo "commit" "-m" commit-message) (my-run-git-in-repo "push") (message "Committed and pushed changes: %s" commit-message)) (defun my-push-safety-branch (branch-name) "Push the current safety branch." (interactive "sBranch name: ") (my-run-git-in-repo "push" "-u" "origin" branch-name) (message "Pushed safety branch %s." branch-name)) (defun my-run-git-in-repo (&rest args) "Run a Git command inside the repository directory specified by `my-git-root`." (let ((default-directory (expand-file-name my-git-root))) (apply #'magit-run-git args))) (defun my-update-discourse-topic (topic-id buffer-name) "Update the first post of a Discourse topic with BUFFER-NAME content." (interactive "nEnter Discourse Topic ID: \nbBuffer Name: ") (let* ((post-url (format "%s/posts/%d.json" my-discourse-base-url topic-id)) (content (with-current-buffer buffer-name (buffer-string))) (json-payload (json-encode `(("raw" . ,content))))) (request post-url :type "PUT" :headers `(("Content-Type" . "application/json") ("Api-Key" . ,my-discourse-api-key) ("Api-Username" . ,my-discourse-api-username)) :data json-payload :success (cl-function (lambda (&key data &allow-other-keys) (message "Successfully updated Discourse topic %d." topic-id)))))) (defun my-update-git-master () "Pull the latest master branch before creating a new safety branch." (my-run-git-in-repo "checkout" "master") (my-run-git-in-repo "pull" "origin" "master") (message "Updated master branch in %s" my-git-root)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; I N T E R F A C E T W E A K S ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (set-face-attribute 'default nil :height 140 :background "#282828" :foreground "#ebdbb2") (set-face-attribute 'cursor nil :background "#ebdbb2") (menu-bar-mode -1) (tool-bar-mode -1) (column-number-mode) (global-visual-line-mode t) (add-to-list 'default-frame-alist '(fullscreen . maximized)) (add-hook 'Info-mode-hook (lambda () (visual-line-mode 1) (setq word-wrap t))) (add-hook 'Info-mode-hook (lambda () (setq fill-column (1- (window-width))) (auto-fill-mode 1))) (delete-selection-mode 1) (windmove-default-keybindings 'control) (set-frame-font "JetBrainsMono-12" nil t) (prefer-coding-system 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (set-selection-coding-system 'utf-8) (set-language-environment "UTF-8") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; G E N E R A L S E T T I N G S ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq frame-resize-pixelwise t native-comp-async-report-warnings-errors nil windmove-create-window t visible-bell t auto-save-no-message t confirm-kill-emacs nil initial-scratch-message ";; Welcome to your streamlined Emacs!\n\n" inhibit-startup-screen t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; A P I C O N F I G U R A T I O N ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar my-discourse-base-url "https://discourse.maas.io" "Base URL for Discourse API.") (defvar my-discourse-api-username "billwear" "Username for Discourse API authentication.") (defvar my-discourse-api-key "ff7e3c7a18abb67ede3cb46ab9047cbb83170a1932d18fea41f569408e9eb77b" "API Key for Discourse API authentication.") (defvar my-git-root "~/src/maas-1" "Path to the root directory of the Git repository.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; K E Y B I N D I N G S ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; HELP (F1) (global-set-key (kbd "") 'my/display-fkey-help) (global-set-key (kbd "C- ") 'describe-key) (global-set-key (kbd "M- ") 'counsel-describe-function) (global-set-key (kbd "S- ") 'counsel-describe-variable) ;; ORG-MODE & AGENDA (F2) (global-set-key (kbd " ") 'my/show-agenda-plus-todos) (global-set-key (kbd "C- ") 'org-capture) (global-set-key (kbd "M- ") 'org-clock-in) (global-set-key (kbd "S- ") 'org-clock-out) ;; DAILY JOURNAL (F3) (global-set-key (kbd " ") 'org-journal-new-entry) (global-set-key (kbd "C- ") #'my/open-todays-org-journal-entry) (global-set-key (kbd "M- ") 'org-journal-search-forever) (global-set-key (kbd "S- ") 'org-journal-new-scheduled-entry) ;; TERMINAL & SHELL (F4) (global-set-key (kbd " ") 'my/run-bash-ansi-term) (global-set-key (kbd "C- ") 'my/insert-shell-command-results) (global-set-key (kbd "S- ") 'my/insert-shell-command-results-in-temp-buffer) ;; WINDOWS (F5) (global-set-key (kbd " ") 'delete-other-windows) (global-set-key (kbd "C- ") 'delete-window) (global-set-key (kbd "S- ") 'kill-buffer-and-window) ;; INIT FILE HANDLING (F6) (global-set-key (kbd " ") 'customize-option) (global-set-key (kbd "C- ") 'my/edit-init) (global-set-key (kbd "S- ") 'eval-buffer) ;; MARKDOWN (F9) (global-set-key (kbd " ") 'markdown-insert-link) (global-set-key (kbd "C- ") 'markdown-insert-table) (global-set-key (kbd "M- ") 'markdown-insert-image) (global-set-key (kbd "S- ") 'my/wrap-region-as-markdown-code-block) ;; REPOSITORIES (F12) (global-set-key (kbd " ") 'my-fetch-discourse-markdown) (global-set-key (kbd "C- ") 'my-update-discourse-topic) (global-set-key (kbd "M- ") 'my-git-commit-and-push) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; F I L E L O C A T I O N S ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq backup-directory-alist `(("." . , "~/var/backups/emacs")) org-archive-location "~/var/archive/emacs/%s_archive::" hdir "~/" default-directory "~/" git-repo-url "git@github.com:billwear/bill.git") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; H O M E D I R A U T O - S Y N C ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (run-at-time "10 min" 600 #'my/git-auto-sync) (add-hook 'kill-emacs-hook 'my/commit-homedir-on-shutdown) (add-hook 'emacs-startup-hook 'my/pull-homedir-on-startup) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; P A C K A G E M A N A G E M E N T ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'package) (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") ("melpa-stable" . "https://melpa.org/packages/") ("org" . "https://orgmode.org/elpa/"))) (package-initialize) (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (require 'use-package) (setq use-package-always-ensure t) (use-package auto-package-update :config (setq auto-package-update-delete-old-versions t) (auto-package-update-maybe)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; O R G - M O D E C O N F I G ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-package org :config :hook ((org-mode . org-indent-mode) (org-mode . visual-line-mode) (org-mode . auto-fill-mode)) :custom (org-support-shift-select t) (org-agenda-span 'day) (org-capture-templates '(("c" "things i do for church" entry (file "~/etc/org/todo.org") "") ("r" "renovation punch list" entry (file "~/etc/org/renovation.org") "") ("G" "add to hrocery list" entry (file "~/etc/org/groceries.org") "") ("g" "Capture a goal" entry (file "~/etc/org/goals.org") ""))) (org-priority-default 82) (org-priority-lowest 90) (org-hide-emphasis-markers t) (org-startup-folded 'overview) (org-log-done 'time) (org-log-redeadline 'time) (org-log-reschedule 'time) (org-todo-repeat-to-state "TODO") (org-log-into-drawer t) (setq (org-agenda-prefix-format '((agenda . "%c: %t"))) (org-agenda-span 'day) (org-agenda-compact-blocks t) (org-todo-keywords '((sequence "TODO(t)" "IN-PROGRESS(i!)" "WAITING(w@)" "BLOCKED(b@)" "REVIEW(r)" "DONE(d!)" "CANCELED(c@)"))) (org-capture-templates '(("t" "Todo" entry (file+headline "~/etc/org/todo.org" "Tasks") "* TODO %?\n %i\n %a") ("c" "Calendar" entry (file+headline "~/etc/org/calendar.org" "Appointments") "* TODO %?\n %i\n %a") ("p" "Projects" entry (file+headline "~/etc/org/projects.org" "New Projects") "* TODO %?\n %i\n %a") ("l" "Life goal" entry (file+headline "~/etc/org/goals.org" "Goals") "* %?\n %i\n %a") ("n" "Notes" entry (file+headline "~/etc/org/notes.org" "Quick Notes") "* %?\n %U\n %i\n %a"))) (org-clock-persist 'history) (org-clock-into-drawer "CLOCKING") (org-clock-out-remove-zero-time-clocks t) (org-clock-report-include-clocking-tasks t))) (org-clock-persistence-insinuate) (run-at-time "1 min" 60 #'org-save-all-org-buffers) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; O R G P U B L I S H I N G C F G ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq org-publish-project-alist '(("billwear-site" :base-directory "~/etc/org/site" :publishing-directory "~/src/billwear.github.io" :publishing-function org-html-publish-to-html :section-numbers nil :with-toc nil :with-author nil :with-creator nil :with-date t :html-head "" :auto-sitemap t :sitemap-title "Bill Wear's Website" :sitemap-filename "index.org" :sitemap-style "tree"))) (defun my/publish-site () "Publish my personal website." (interactive) (let ((default-directory "~/src/billwear.github.io")) (shell-command "git add . && git commit -m 'Update site' && git push"))) ;; Bind publishing to a key (global-set-key (kbd "C-c p w") #'my/publish-site) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; O R G - J O U R N A L C O N F I G ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-package org-journal :ensure t :custom (org-journal-dir "~/var/log/2025") (org-journal-date-format "%A, %d %B %Y") (org-journal-file-format "%Y-%m-%d.org") (org-journal-time-format "%H:%M") (org-journal-enable-agenda-integration t) (org-journal-find-file 'find-file) (org-journal-hide-entries-p nil) (org-journal-carryover-items "TODO=") :config (add-hook 'org-journal-after-entry-create-hook 'save-buffer)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; G O L D E N R A T I O C O N F ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-package golden-ratio :ensure t :config (golden-ratio-mode 1) (setq golden-ratio-auto-scale t golden-ratio-adjust-factor 1.2 golden-ratio-wide-adjust-factor 0.8 golden-ratio-exclude-modes '(ediff-mode dired-mode ibuffer-mode) golden-ratio-exclude-buffer-names '("*Messages*" "*Help*") golden-ratio-exclude-buffer-regexp '("^\*.*\*$"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; I V Y & C O U N S E L C O N F ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-package ivy :ensure t :config (ivy-mode 1) (setq ivy-use-virtual-buffers t ivy-count-format "(%d/%d) " ivy-wrap t ivy-re-builders-alist '((t . ivy--regex-plus)) ivy-height 15 ivy-fixed-height-minibuffer t ivy-initial-inputs-alist nil ivy-format-function #'ivy-format-function-arrow) :bind ("C-c v" . ivy-resume) ("C-x b" . ivy-switch-buffer) ("C-s" . swiper)) (use-package counsel :ensure t :after ivy :config (counsel-mode 1) (setq counsel-find-file-ignore-regexp "~$" counsel-preselect-current-file t) :bind ("M-x" . counsel-M-x) ("C-x C-f" . counsel-find-file) ("C-x C-r" . counsel-recentf) ("C-c f" . counsel-fzf) ("C-c g" . counsel-git) ("C-c k" . counsel-rg) ("C-c l" . counsel-locate)) ;; Ivy-rich for better formatting (use-package ivy-rich :ensure t :after ivy :init (ivy-rich-mode 1) :config (setq ivy-rich-path-style 'abbrev)) ;; Enable prescient for smarter sorting (use-package prescient :ensure t) (use-package ivy-prescient :ensure t :after (ivy prescient) :config (ivy-prescient-mode 1)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; M A R K D O W N - M O D E C F G ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-package markdown-mode :ensure t :mode ("\.md\'" . markdown-mode) :custom (markdown-command "pandoc --from markdown --to html --standalone") (markdown-enable-math t) (markdown-enable-wiki-links t) (markdown-enable-highlighting-syntax t) (markdown-fontify-code-blocks-natively t) (markdown-hide-markup t) (markdown-gfm-uppercase-checkbox t) :hook ((markdown-mode . visual-line-mode) (markdown-mode . flyspell-mode) (markdown-mode . auto-fill-mode) (markdown-mode . outline-minor-mode) (markdown-mode . variable-pitch-mode)) :bind (:map markdown-mode-map ("C-c C-e" . markdown-export) ("C-c C-p" . markdown-preview) ("C-c C-l" . markdown-insert-link) ("C-c C-i" . markdown-insert-image) ("C-c C-t" . markdown-insert-table))) ;; === Markdown Live Preview === (use-package grip-mode :ensure t :after markdown-mode :custom (grip-update-after-change nil) :bind (:map markdown-mode-map ("C-c C-g" . grip-mode))) ;; === Markdown Table Editing === (use-package markdown-toc :ensure t :after markdown-mode :hook (markdown-mode . markdown-toc-mode) :custom (markdown-toc-header-toc-title "Table of Contents")) ;; === Pandoc Integration === (use-package pandoc-mode :ensure t :hook (markdown-mode . pandoc-mode)) ;; === Better Markdown Navigation === (defun my/markdown-navigate () "Quickly navigate headers in a Markdown file." (interactive) (consult-outline)) (global-set-key (kbd "C-c m n") 'my/markdown-navigate) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; J S O N H A N D L I N G C F G ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-package json-mode :ensure t :mode "\.json\'" :config (setq json-reformat:indent-width 2 json-reformat:pretty-string? t) :bind ("C-c j f" . json-pretty-print-buffer)) ;; JSON utilities (use-package json :ensure t :config (defun my/json-format-buffer () "Pretty-print the JSON in the current buffer." (interactive) (json-pretty-print-buffer)) (global-set-key (kbd "C-c j p") 'my/json-format-buffer)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; H T T P R E Q H A N D L I N G ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-package request :ensure t :config (setq request-storage-directory "~/.emacs.d/request") (setq request-log-level 'debug) (defun my/request-json (url &optional callback) "Make a GET request to URL and pretty-print the JSON response." (interactive "sEnter URL: ") (request url :parser 'json-read :success (cl-function (lambda (&key data &allow-other-keys) (with-output-to-temp-buffer "*Request Response*" (princ (json-encode data))))))) :bind ("C-c r g" . my/request-json)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; W H I C H - K E Y C O N F I G ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-package which-key :ensure t :config (which-key-mode)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; C U S T O M S E T V A R S ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(custom-safe-themes '("00d7122017db83578ef6fba39c131efdcb59910f0fac0defbe726da8072a0729" "1781e8bccbd8869472c09b744899ff4174d23e4f7517b8a6c721100288311fa5" "de8f2d8b64627535871495d6fe65b7d0070c4a1eb51550ce258cd240ff9394b0" "0b41a4a9f81967daacd737f83d3eac7e3112d642e3f786cf7613de4da97a830a" "aa545934ce1b6fd16b4db2cf6c2ccf126249a66712786dd70f880806a187ac0b" default)) '(org-agenda-files '("/home/stormrider/var/log/2025/2025-02-10.org" "/home/stormrider/var/log/2025/2025-02-09.org")) '(org-journal-find-file-fn 'find-file nil nil "Customized with use-package org-journal") '(package-selected-packages '(standard-themes nano-theme modus-themes ef-themes aircon-theme ahungry-theme zenburn-theme ujelly-theme tangotango-theme subatomic-theme spacemacs-theme solarized-theme oblivion-theme monokai-theme moe-theme material-theme inkpot-theme gruvbox-theme gruber-darker-theme gotham-theme dracula-theme apropospriate-theme anti-zenburn-theme ample-theme alect-themes afternoon-theme yasnippet-snippets which-key-posframe treemacs-magit request pandoc-mode org-roam-ui org-journal org-brain markdown-toc json-mode ivy-rich ivy-prescient hackernews grip-mode golden-ratio-scroll-screen golden-ratio eradio epresent elmacro counsel-projectile company auto-package-update))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; C U S T O M S E T F A C E S ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; D I S U S E D S T U F F ( O F F ) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; === Advanced Org-Mode Time Tracking === ;; (setq org-clocktable-defaults ;; '(:maxlevel 2 :scope agenda :link t :compact t :block today)) ;; (defun my/generate-clocktable () ;; "Generate a clocktable for today." ;; (interactive) ;; (org-clock-report)) ;; (global-set-key (kbd "C-c t c") 'my/generate-clocktable) ;; ;; Define special tags for better organization ;; (setq org-tag-alist '(("work" . ?w) ("home" . ?h) ("project" . ?p) ("reading" . ?r) ("urgent" . ?u))) ;; ;; === Org-Roam Configuration === ;; (use-package org-roam ;; :ensure t ;; :custom ;; (org-roam-directory (file-truename "~/etc/org/roam")) ;; (org-roam-completion-everywhere t) ;; (org-roam-db-location "~/etc/org/roam/org-roam.db") ;; (org-roam-dailies-directory "~/etc/org/roam/dailies/") ;; (org-roam-capture-templates ;; '(("d" "default" plain "%?" :target ;; (file+head "${slug}.org" "#+title: ${title}\n") ;; :unnarrowed t) ;; ("m" "meeting" plain "* Meeting with %?\n:PROPERTIES:\n:attendees: \n:location: \n:END:\n\n** Notes" ;; :target (file+head "meetings/${slug}.org" "#+title: Meeting - ${title}\n#+date: %<%Y-%m-%d>\n") ;; :unnarrowed t) ;; ("p" "project" plain "* Goals\n- %?\n* Tasks\n** TODO Setup project structure" ;; :target (file+head "projects/${slug}.org" "#+title: ${title}\n#+date: %<%Y-%m-%d>\n") ;; :unnarrowed t))) ;; (org-roam-dailies-capture-templates ;; '(("d" "daily" entry ;; "* %<%I:%M %p> %?" ;; :target (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")))) ;; :config ;; (org-roam-db-autosync-enable)) ;; ;; === Org-Roam UI Enhancements === ;; (use-package org-roam-ui ;; :ensure t ;; :after org-roam ;; :config (setq org-roam-ui-sync-theme t ;; org-roam-ui-follow t ;; org-roam-ui-update-on-save t ;; org-roam-ui-open-on-start t)) ;; ;; === Org-Roam Keybindings === ;; (global-set-key (kbd "C-c r f") 'org-roam-node-find) ;; (global-set-key (kbd "C-c r i") 'org-roam-node-insert) ;; (global-set-key (kbd "C-c r d") 'org-roam-dailies-capture-today) ;; (global-set-key (kbd "C-c r t") 'org-roam-dailies-goto-today) ;; (global-set-key (kbd "C-c r b") 'org-roam-buffer-toggle) ;; ;; === Org-Roam Utilities === ;; (defun my/org-roam-generate-map () ;; "Generate an Org-Roam graph visualization." ;; (interactive) ;; (org-roam-ui-open)) ;; (global-set-key (kbd "C-c r m") 'my/org-roam-generate-map) ;; ;; === Org-Brain Configuration === ;; (use-package org-brain ;; :ensure t ;; :custom ;; (org-brain-path "~/etc/org/brain") ;; (org-id-locations-file "~/etc/org/brain/.org-id-locations") ;; (org-brain-visualize-default-choices 'all) ;; (org-brain-title-max-length 40) ;; (org-brain-include-file-entries t) ;; (org-brain-file-entries-use-title t) ;; (org-brain-show-resources t) ;; (org-brain-headline-entry-name-format-function #'identity) ;; (org-brain-use-cache t) ;; (org-brain-show-text t) ;; :config ;; (setq org-brain-refile-max-level 3) ;; (setq org-brain-children-default-namespace "default") ;; ;; Automatically refresh Org-Brain ;; (add-hook 'after-save-hook #'org-brain-sync-id-locations) ;; ;; Set up a function to quickly capture Org-Brain notes ;; (defun my/org-brain-quick-note (title) ;; "Quickly create a new Org-Brain note with a given TITLE." ;; (interactive "sEnter note title: ") ;; (let ((file (expand-file-name (concat title ".org") org-brain-path))) ;; (unless (file-exists-p file) ;; (with-temp-file file ;; (insert (format "#+TITLE: %s\n#+DATE: %s\n\n" title (format-time-string "%Y-%m-%d")))))) ;; (find-file file)) ;; ;; Keybindings for Org-Brain ;; :bind ;; ("C-c b v" . org-brain-visualize) ;; ("C-c b a" . org-brain-add-child) ;; ("C-c b p" . org-brain-add-parent) ;; ("C-c b f" . org-brain-add-friendship) ;; ("C-c b q" . my/org-brain-quick-note) ;; ("C-c b l" . org-brain-goto)) ;; ;; === Magit Configuration === ;; (use-package magit ;; :ensure t ;; :bind (("C-x g" . magit-status) ;; Open Magit status ;; ("C-x M-g" . magit-dispatch)) ;; Quick access to dispatch menu ;; :custom ;; (magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1) ;; Fullscreen magit-status ;; (magit-diff-refine-hunk 'all) ;; Highlight word-level diffs ;; (magit-refresh-status-buffer nil) ;; Prevent excessive refreshing ;; (magit-commit-ask-to-stage nil) ;; Auto-stage modified files before commit ;; (magit-save-repository-buffers 'dontask) ;; Don't prompt when saving ;; (magit-repository-directories '(("~/src" . 2) ("~/projects" . 2))) ;; Auto-detect repos ;; (magit-log-margin '(t age-abbreviated magit-log-margin-width t 18))) ;; Better log view ;; ;; Create a keymap for Magit shortcuts ;; (defvar my-magit-map (make-sparse-keymap) ;; "Custom keymap for frequently used Magit commands.") ;; (define-key my-magit-map (kbd "b") 'magit-branch-checkout) ;; Checkout branches ;; (define-key my-magit-map (kbd "c") 'magit-commit) ;; Quick commit shortcut ;; (define-key my-magit-map (kbd "p") 'magit-push) ;; Push changes ;; (define-key my-magit-map (kbd "f") 'magit-fetch) ;; Fetch updates from remote ;; (define-key my-magit-map (kbd "l") 'magit-log-all) ;; View all commits ;; ;; Bind Magit keymap to C-c g ;; (global-set-key (kbd "C-c g") my-magit-map) ;; ;; === Projectile Configuration === ;; (use-package projectile ;; :ensure t ;; :diminish projectile-mode ;; :init ;; (setq projectile-completion-system 'ivy ;; projectile-enable-caching t ;; projectile-indexing-method 'hybrid ;; projectile-sort-order 'recently-active ;; projectile-project-search-path '("~/usr/projects/" "~/src/")) ;; :config ;; (projectile-mode +1) ;; (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) ;; :bind (:map projectile-command-map ;; ("f" . projectile-find-file) ;; ("p" . projectile-switch-project) ;; ("b" . projectile-switch-to-buffer) ;; ("s g" . projectile-grep) ;; ("r" . projectile-replace) ;; ("k" . projectile-kill-buffers) ;; ("d" . projectile-dired))) ;; (use-package counsel-projectile ;; :ensure t ;; :after (projectile ivy) ;; :config (counsel-projectile-mode)) ;; ;; === Treemacs Configuration === ;; (use-package treemacs ;; :ensure t ;; :defer t ;; :config ;; (setq treemacs-width 30 ;; treemacs-follow-mode t ;; treemacs-filewatch-mode t ;; treemacs-git-mode 'deferred ;; treemacs-indentation 2 ;; treemacs-collapse-dirs 3 ;; treemacs-display-in-side-window t ;; treemacs-silent-refresh t ;; treemacs-silent-filewatch t ;; treemacs-show-hidden-files t ;; ;; treemacs-no-png-images t ;; ;; treemacs-resize-icons 14 ;; treemacs-git-commit-diff-mode t ;; treemacs-no-delete-other-windows t ;; treemacs-space-between-root-nodes t) ;; :bind ;; ("C-x t t" . treemacs) ;; ("C-x t f" . treemacs-find-file) ;; ("C-x t p" . treemacs-projectile) ;; ("C-x t r" . treemacs-refresh)) ;; (use-package treemacs-magit ;; :after (treemacs magit) ;; :ensure t) ;; ;; (use-package treemacs-all-the-icons ;; ;; :after treemacs ;; ;; :ensure t ;; ;; :config (treemacs-load-theme "all-the-icons")) ;; (defun treemacs-open-terminal-here () ;; "Open a terminal in the current Treemacs directory." ;; (interactive) ;; (let ((node (treemacs-current-button))) ;; (if node ;; (let ((dir (treemacs-button-get node :path))) ;; (if (file-directory-p dir) ;; (let ((default-directory dir)) ;; (ansi-term "/bin/bash")) ;; (message "Node is not a directory."))) ;; (message "No node selected.")))) ;; (with-eval-after-load 'treemacs ;; (define-key treemacs-mode-map (kbd "T") #'treemacs-open-terminal-here) ;; (define-key treemacs-mode-map (kbd "R") #'treemacs-refresh) ;; (define-key treemacs-mode-map (kbd "P") #'treemacs-projectile)) ;; (defun my/treemacs-set-default-project () ;; "Set the default Treemacs project to the home directory." ;; (let ((default-root "~/")) ;; (unless (treemacs-current-workspace) ;; (treemacs-select-workspace-by-name "Default")) ;; (treemacs-do-add-project-to-workspace default-root "Home"))) ;; (add-hook 'emacs-startup-hook #'my/treemacs-set-default-project) ;; (defun my/treemacs-setup () ;; "Ensure Treemacs starts with the default project." ;; (treemacs) ;; (unless (treemacs-workspace->is-empty?) ;; (treemacs-do-add-project-to-workspace "~/" "Home"))) ;; (add-hook 'emacs-startup-hook #'my/treemacs-setup) ;; (defun my/treemacs-cleanup () ;; "Cleanup Treemacs on Emacs exit." ;; (when (treemacs-is-treemacs-window? (selected-window)) ;; (delete-window))) ;; (add-hook 'kill-emacs-hook #'my/treemacs-cleanup) ;; (with-eval-after-load 'treemacs ;; ;; Set root folder face (bold, larger, better contrast) ;; (set-face-attribute 'treemacs-root-face nil ;; :family "JetBrains Mono" ;; :height 1.2 ;; :weight 'bold) ;; ;; Directory face (differentiated from files) ;; (set-face-attribute 'treemacs-directory-face nil ;; :family "JetBrains Mono" ;; :foreground "#8be9fd" ;; Light Blue ;; :weight 'normal) ;; ;; File face (slightly dimmer to highlight directories) ;; (set-face-attribute 'treemacs-file-face nil ;; :family "JetBrains Mono" ;; :foreground "#f8f8f2") ;; White ;; ;; Collapsed directories ;; (set-face-attribute 'treemacs-directory-collapsed-face nil ;; :foreground "#50fa7b") ;; Green ;; ;; Highlight for selected file ;; (set-face-attribute 'treemacs-hl-line-face nil ;; :background "#44475a") ;; Darker highlight ;; ;; Git integration (Untracked, Modified, Ignored, etc.) ;; (set-face-attribute 'treemacs-git-untracked-face nil ;; :foreground "#ffb86c") ;; Orange ;; (set-face-attribute 'treemacs-git-modified-face nil ;; :foreground "#ff79c6") ;; Pink ;; (set-face-attribute 'treemacs-git-renamed-face nil ;; :foreground "#bd93f9") ;; Purple ;; (set-face-attribute 'treemacs-git-ignored-face nil ;; :foreground "#6272a4") ;; Dimmed Blue ;; ;; Background for entire Treemacs window ;; (set-face-attribute 'treemacs-window-background-face nil ;; :background "#282a36")) ;; Dracula theme dark background ;; ;; === Company-Mode Configuration === ;; (use-package company ;; :ensure t ;; :config ;; (setq company-minimum-prefix-length 1 ;; company-idle-delay 0.1 ;; company-selection-wrap-around t ;; company-dabbrev-ignore-case t ;; company-dabbrev-other-buffers t ;; company-dabbrev-downcase nil ;; company-tooltip-align-annotations t ;; company-tooltip-limit 15 ;; company-show-numbers t ;; company-require-match nil ;; company-dabbrev-code-other-buffers t ;; company-dabbrev-code-everywhere t ;; company-transformers '(company-sort-by-occurrence)) ;; ;; Allow dabbrev to include words from all buffers, not just similar major modes ;; (setq company-dabbrev-other-buffers 'all) ;; ;; Make it easier to dismiss unwanted completions ;; (define-key company-active-map (kbd "C-g") 'company-abort) ;; (define-key company-active-map (kbd " ") 'company-abort) ;; ;; More aggressive dabbrev expansions ;; (setq company-dabbrev-minimum-length 2) ;; (setq company-dabbrev-ignore-case t) ;; (setq company-dabbrev-code-ignore-case t) ;; (setq company-dabbrev-code-everywhere t) ;; (global-company-mode 1)) ;; ;; Improve backend settings for different modes ;; (defun my/setup-company-backends () ;; "Configure company backends based on mode." ;; (setq-local company-backends '((company-files ;; company-keywords ;; company-capf ;; company-dabbrev-code ;; company-dabbrev ;; company-yasnippet)))) ;; (add-hook 'prog-mode-hook #'my/setup-company-backends) ;; (add-hook 'text-mode-hook #'my/setup-company-backends) ;; (add-hook 'org-mode-hook #'my/setup-company-backends) ;; ;; Keybindings for better control ;; (with-eval-after-load 'company ;; (define-key company-active-map (kbd "C-n") #'company-select-next) ;; (define-key company-active-map (kbd "C-p") #'company-select-previous) ;; (define-key company-active-map (kbd "C-d") #'company-show-doc-buffer) ;; (define-key company-active-map (kbd "M-.") #'company-complete)) ;; (use-package which-key ;; :ensure t ;; :config ;; (which-key-mode) ;; ;; Configure which-key behavior ;; (setq ; which-key-idle-delay 0.1 ;; ; which-key-idle-secondary-delay 0.1 ;; which-key-popup-type 'side-window ;; which-key-max-description-length 50 ;; which-key-allow-imprecise-window-fit t ;; which-key-sort-order 'which-key-key-order-alpha ;; which-key-separator " → " ;; which-key-use-C-h-commands t) ;; ;; Better control over pagination and window sizing ;; (setq which-key-side-window-max-height 0.5 ;; which-key-side-window-max-width 0.45 ;; which-key-side-window-location 'bottom ;; which-key-add-column-padding 2 ;; which-key-special-keys '("SPC" "TAB" "RET" "ESC")) ;; ;; Enable extra features ;; ;(which-key-enable-god-mode-support) ;; (which-key-setup-side-window-bottom) ;; FIXED: Call this as a function ;; (which-key-setup-minibuffer)) ;; Same here ;; ;; === Yasnippet Configuration === ;; (use-package yasnippet ;; :ensure t ;; :config ;; (yas-global-mode 1) ;; (setq yas-triggers-in-field t ;; yas-wrap-around-region t ;; yas-indent-line 'fixed ;; yas-prompt-functions '(yas-completing-prompt yas-ido-prompt yas-dropdown-prompt)) ;; ;; Load additional snippet collections ;; (use-package yasnippet-snippets ;; :ensure t) ;; ;; Enable snippet expansion everywhere, including inside strings and comments ;; (setq yas-key-syntaxes '("w" "w_" "w_.")) ;; ;; Create a function to reload snippets quickly ;; (defun my/reload-yasnippets () ;; "Reload all Yasnippet snippets." ;; (interactive) ;; (yas-reload-all)) ;; ;; Automatically reload snippets on Emacs startup ;; (add-hook 'after-init-hook #'yas-reload-all)) ;; ;; Correctly bind keys using :map ;; (use-package yasnippet ;; :bind ;; (:map yas-minor-mode-map ;; ("C-c y n" . yas-new-snippet) ;; ("C-c y v" . yas-visit-snippet-file) ;; ("C-c y r" . my/reload-yasnippets) ;; ("C-c y i" . yas-insert-snippet) ;; ("C-c y e" . yas-expand))) ;; ;; === Enhanced Keybindings for Maximum Usability === ;; ;; === Custom Set Variables === ;; (custom-set-variables ;; ;; custom-set-variables was added by Custom. ;; ;; If you edit it by hand, you could mess it up, so be careful. ;; ;; Your init file should contain only one such instance. ;; ;; If there is more than one, they won't work right. ;; '(org-agenda-prefix-format '((agenda . "%t"))) ;; '(org-agenda-sorting-strategy ;; '((agenda time-up category-up priority-down) ;; (todo category-up priority-down) ;; (tags priority-down category-keep) ;; (search category-keep))) ;; '(org-journal-find-file-fn 'find-file nil nil "Customized with use-package org-journal") ;; '(org-priority-default 90) ;; '(org-priority-lowest 90) ;; '(package-selected-packages ;; '(golden-ratio-scroll-screen which-key-posframe request golden yasnippet writegood-mode which-key websocket unfill treemacs-magit simple-httpd pandoc-mode pandoc org-super-agenda org-roam org-journal org-bullets move-text lsp-ltex lsp-latex golden-ratio flycheck exec-path-from-shell emms ement diminish counsel company blacken auto-package-update accent)) ;; '(yas-snippet-dirs '("~/.yasnippets"))) ;; ;; === Custom Set Faces === ;; (custom-set-faces ;; ;; custom-set-faces was added by Custom. ;; ;; If you edit it by hand, you could mess it up, so be careful. ;; ;; Your init file should contain only one such instance. ;; ;; If there is more than one, they won't work right. ;; '(treemacs-root-face ((t (:inherit font-lock-constant-face :underline t :weight bold :height 1.2 :family "JetBrains Mono"))))) ;; ;; Org-Roam & Brain ;; (global-set-key (kbd "C-c m r") 'org-roam-node-find) ;; (global-set-key (kbd "C-c m R") 'org-roam-buffer-toggle) ;; (global-set-key (kbd "C-c m b") 'org-brain-visualize) ;; (global-set-key (kbd "C-c m p") 'org-brain-add-parent) ;; (global-set-key (kbd "C-c m f") 'org-brain-add-friendship) ;; ;; Git & Magit ;; (global-set-key (kbd "C-c m g") 'magit-status) ;; (global-set-key (kbd "C-c m G") 'magit-dispatch) ;; (global-set-key (kbd "C-c m P") 'magit-push) ;; (global-set-key (kbd "C-c m F") 'magit-fetch) ;; (global-set-key (kbd "C-c m L") 'magit-log-all) ;; ;; Treemacs & File Management ;; (global-set-key (kbd "C-c m d") 'diredHomeDir) ;; (global-set-key (kbd "C-c m T") 'treemacs) ;; (global-set-key (kbd "C-c m D") 'treemacs-projectile) ;; (global-set-key (kbd "C-c m e") 'editInit) ;; (global-set-key (kbd "C-c m B") 'treemacs-open-terminal-here) ;; ;; Snippets & Company Mode ;; (global-set-key (kbd "C-c m y") 'yas-insert-snippet) ;; (global-set-key (kbd "C-c m Y") 'yas-new-snippet) ;; (global-set-key (kbd "C-c m N") 'yas-reload-all) ;; (global-set-key (kbd "C-c m C-n") 'company-complete) ;; ;; Window & Buffer Navigation ;; (global-set-key (kbd "C-c m v") 'ivy-resume) ;; (global-set-key (kbd "C-c m x") 'counsel-M-x) ;; (global-set-key (kbd "C-c m z") 'previous-buffer) ;; (global-set-key (kbd "C-c m X") 'golden-ratio-mode) ;; ;; Miscellaneous ;; (global-set-key (kbd "C-c m ?") 'bbang) ;; (global-set-key (kbd "C-c m !") 'insSHcmd) ;; (global-set-key (kbd "C-c m q") 'my/org-brain-quick-note) ;; (global-set-key (kbd "C-c m n") 'my/markdown-navigate)