This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: | |
;; Emacs: Switch to another project using (find-file) | |
;; Gits URL: https://gist.github.com/jamescherti/bf74fb911d17583e7f4b57946f1ea775 | |
;; License: MIT | |
;; Author: James Cherti | |
(defun my-project-prompt-project-dir () | |
"Prompt the user for a directory that is one of the known project roots." | |
(project--ensure-read-project-list) | |
(setq pr-dir (completing-read "Select project: " project--list nil t))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: | |
;; Prevent 'evil-paste-after' and 'evil-paste-before' from failing when the | |
;; paste ring (akin to the clipboard) is empty. | |
;; | |
;; Gits URL: | |
;; License: MIT | |
;; Author: James Cherti | |
(defun ignore-empty-ring-errors (orig-func &rest args) | |
"Ignore errors related to the empty ring when calling ORIG-FUNC with ARGS." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Description: | |
;; Emacs Evil: Move Org subtrees up or down while preserving the cursor's | |
;; column. Unlike the default behavior in Emacs Org, which moves the cursor to | |
;; the beginning of the line, this approach maintains the cursor's current | |
;; column position, avoiding undesirable cursor movement. | |
;; | |
;; URL: https://gist.github.com/jamescherti/35475b05a45482f4bde325895073aa3e | |
;; License: MIT | |
;; Author: James Cherti |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Strike through DONE tasks in the Emacs Org Mode | |
;; URL: https://gist.github.com/jamescherti/e12d494296643e67d6e9a8150b14c4cb | |
;; License: MIT | |
;; Author: James Cherti | |
;; Enable the fontification of headlines for tasks that have been marked as | |
;; completed. This means that the entire headline, not just the TODO keyword, | |
;; will visually change to reflect the task's completion status. | |
(setq org-fontify-done-headline t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Description: | |
# The parameters I use to compile Emacs >=29 to my specific needs and preferences. | |
# | |
# Gits URL: https://gist.github.com/jamescherti/62c993aa71630abfd2a436e3028171ce | |
# License: MIT | |
# Author: James Cherti | |
# | |
CFLAGS="-O2 -march=native -fomit-frame-pointer" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Emacs org mode: Replace list hyphen "-" with bullet | |
;; URL: https://gist.github.com/jamescherti/61ebd7ff293d989a385d2e73fa0b45b4 | |
(font-lock-add-keywords | |
'org-mode '(("^ *\\([-]\\) " | |
(0 (prog1 () (compose-region (match-beginning 1) | |
(match-end 1) | |
"\u2022")))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optimized picom.conf configuration (tested on an NVIDIA card) | |
# Gits URL: https://gist.github.com/jamescherti/59f61eeaf17ccc16e1eab2c98d699d31 | |
# License: MIT | |
# Maintainer of this picom.conf: James Cherti | |
################################# | |
# Shadows # | |
################################# | |
# Enabled client-side shadows on windows. Note desktop windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Emacs Consult snippet: Exclude *.asc files from Consult Preview | |
;; | |
;; The purpose of excluding ".asc" files in this case is to prevent the preview feature | |
;; from triggering password prompts each time navigation occurs within the list of files | |
;; displayed by Emacs consult. | |
;; The default regex: (setq consult-preview-excluded-files ("\\`/[^/|:]+:")) | |
;; | |
;; Author: James Cherti | |
;; GitHub Gist: https://gist.github.com/jamescherti/901ea7aa68f2051914e20bddbeb53178 | |
;; License: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Language: Vim script | |
" Author: James Cherti | |
" License: MIT | |
" Description: Improve the color scheme of Vim Terminal (Tango dark theme), | |
" and prevent :colorscheme from changing the terminal color scheme. | |
" URL: https://www.jamescherti.com/vim-tango-color-scheme-vim-terminal/ | |
" Gnome-Terminal Tango Dark | |
let g:terminal_ansi_colors_black = '#2E3436' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Language: Emacs Lisp (elisp) | |
;; Description: Rename both current buffer and file it is visiting. | |
;; Author: James Cherti | |
;; License: MIT | |
;; URL: https://gist.github.com/jamescherti/fc1054ce24606c4574cfa41d1ed67412 | |
(defun rename-buffer-and-file () | |
"Rename both current buffer and file it is visiting." | |
(interactive) | |
(let* ((bufname (buffer-name)) |
NewerOlder