News for hackers. Stuff that matters.
Re:Instant access to your shell init files by m463 on Saturday July 18, 2020 @06:51PM (#23885501)
I put it on F2

  (defvar init-files-list nil)

  (defun my-rotate-list (l)
    "Return list L with the first element moved to the end"
    (nconc (cdr l) (list (car l))))

  (defun edit-init-files-el ()
    "cycle through init-files-list, visiting each file"
    (interactive)
    (find-file (car init-files-list))
    (setq init-files-list (my-rotate-list init-files-list))
    (delete-other-windows (selected-window)))


  ;; elsewhere
  (append-list 'init-files-list
               '("~/.emacs.d/init.el"
                 "~/.bashrc"))

  (global-set-key [f2]      'edit-init-files-el)  ;; cycles init.el -> .bashrc -> ...
this is actually simplified, I append different startup files depending on the system I'm using, and I have a keys.el file devoted specifically to my key definitions that I put in the init-files-list

There are no comments on this comment yet.