Skip to content

Instantly share code, notes, and snippets.

@brfitzpatrick
Last active July 22, 2019 09:15
Show Gist options
  • Save brfitzpatrick/6fb7d57969e020634bc276c19f60c14c to your computer and use it in GitHub Desktop.
Save brfitzpatrick/6fb7d57969e020634bc276c19f60c14c to your computer and use it in GitHub Desktop.
emacs25 ~/.emacs
(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-enabled-themes (quote (manoj-dark)))
'(package-selected-packages (quote (polymode)))
'(show-paren-mode t))
(electric-indent-mode -1)
(add-hook 'after-change-major-mode-hook (lambda() (electric-indent-mode -1)))
(add-hook 'ess-mode-hook (lambda () (ess-set-style 'GNU 'quiet)))
(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.
)
(fset 'insert-new-R-chunk
[?` ?` ?` ?\{ ?r ?\} return return ?` ?` ?` return return ?\C-p ?\C-p ?\C-p])
(global-set-key (kbd "C-c a") 'insert-new-R-chunk)
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
(require 'poly-R)
(require 'poly-markdown)
(add-to-list 'auto-mode-alist '("\\.md" . poly-markdown-mode))
(add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))
(add-to-list 'auto-mode-alist '("\\.rmd" . poly-markdown+r-mode))
'(ess-rterm-version-paths "/user/lib/R-3.5.1/bin/R")
;; add the option to run older version of R you have installed
;; M-x R-3.5.1
(defun R-3.5.1 ()
(interactive)
(let ((inferior-R-program-name "/usr/lib/R-3.5.1/bin/R"))
(R)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment