Skip to content

Instantly share code, notes, and snippets.

@zvakanaka
Last active July 2, 2019 15:46
Show Gist options
  • Save zvakanaka/2a7d3d531eacce03df61 to your computer and use it in GitHub Desktop.
Save zvakanaka/2a7d3d531eacce03df61 to your computer and use it in GitHub Desktop.
;;remove top menu bar that nobody has ever clicked
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(menu-bar-mode -1)
;; move multiple windows with shortcuts
(global-set-key (kbd "M-<up>") 'enlarge-window)
(global-set-key (kbd "M-<down>") 'shrink-window)
(global-set-key (kbd "M-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "M-<left>") 'shrink-window-horizontally)
(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.
'(indent-tabs-mode nil)
'(inhibit-default-init t)
'(inhibit-startup-screen t)
'(js-indent-level 2)
'(package-selected-packages (quote (js2-mode))))
(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.
)
;; use global backup dir
(setq backup-directory-alist `(("." . "~/.saves")))
;; ignore backing up certain files thanks https://stackoverflow.com/a/483701/4151489
(defvar my-backup-ignore-regexps (list ".env" "ssh-key")
"*List of filename regexps to not backup")
(defun my-backup-enable-p (name)
"Filter certain file backups"
(when (normal-backup-enable-predicate name)
(let ((backup t))
(mapc (lambda (re)
(setq backup (and backup (not (string-match re name)))))
my-backup-ignore-regexps)
backup)))
(setq backup-enable-predicate 'my-backup-enable-p)
@zvakanaka
Copy link
Author

zvakanaka commented Aug 7, 2015

Copy and paste in terminal:
wget -qO- https://gist.github.com/zvakanaka/2a7d3d531eacce03df61/raw/0921804cbcc72e08faa13398ed4339d3e47cc051/.emacs >> ~/.emacs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment