I added some define-key commands to the dotspacemacs/user-config function in .spacemacs

;; Fix SHIFT + arrow keys inside screen/tmux
(define-key input-decode-map "\e[1;2A" [S-up])
(define-key input-decode-map "\e[1;2B" [S-down])
(define-key input-decode-map "\e[1;2C" [S-right])
(define-key input-decode-map "\e[1;2D" [S-left])

How would I include them directly from an external file which would be a plain text file, ie not a .el so it would be evaluated as part of the dotspacemacs/user-config function?

  • Why would you want to use a normal text file instead of an elisp-file? – jue Jul 11 '17 at 19:17
  • By include I mean pure textual substitution, so if the command works as I expect the file name extension shouldn't matter – vfclists Jul 11 '17 at 19:37
  • 2
    I know what you want to do (I'm a C coder) but I do not understand why you want to do it. I honestly think your concept is wrong. Have a look at here emacswiki.org/emacs/LoadingLispFiles – jue Jul 11 '17 at 19:51
  • You want to use 'load'. I don't think the extension matters (if the file exists) – YoungFrog Jul 11 '17 at 21:36

The easiest way is to use load.

(load-file "~/elisp/foo.el") 

More ways you can find in the Spacemacs configuration layer docu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.