Created
May 10, 2019 08:44
-
-
Save Glutexo/e61ae20e389c2229405bb3c1937e3b5d to your computer and use it in GitHub Desktop.
My Emacs init.el file for a pleasant (if possible) usage on macOS
This file contains hidden or 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
| ;; 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) | |
| ;; Disable tool bar and menu bar in GUI | |
| (menu-bar-mode 0) | |
| (tool-bar-mode 0) | |
| ;; Display line numbers | |
| (global-linum-mode t) | |
| ;; Display column numbers | |
| (column-number-mode t) | |
| ;; Use recent file list | |
| (recentf-mode t) | |
| (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. | |
| '(inhibit-startup-screen t) | |
| '(ns-alternate-modifier (quote none)) | |
| '(ns-function-modifier (quote meta)) | |
| '(package-selected-packages | |
| (quote | |
| (reveal-in-osx-finder markdown-preview-mode alchemist markdown-mode magit yaml-mode))) | |
| '(save-interprogram-paste-before-kill t)) | |
| (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 MELPA package repository. | |
| (require 'package) | |
| (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) | |
| (not (gnutls-available-p)))) | |
| (proto (if no-ssl "http" "https"))) | |
| ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired | |
| ;;(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) | |
| (add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) | |
| (when (< emacs-major-version 24) | |
| ;; For important compatibility libraries like cl-lib | |
| (add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/"))))) | |
| (package-initialize) | |
| ;; Load custom libraries | |
| (add-to-list 'load-path "~/.emacs.d/custom") | |
| (require 'uuidgen) | |
| ;; Set up custom modes | |
| (add-to-list 'auto-mode-alist '("/\\.xonshrc\\'" . python-mode)) | |
| ;; Key bindings | |
| (global-set-key (kbd "C-x g") 'magit-status) | |
| (global-set-key (kbd "C-x c") 'magit-clone) | |
| (global-set-key (kbd "C-S-n") 'scroll-up-line) | |
| (global-set-key (kbd "C-S-p") 'scroll-down-line) | |
| (global-set-key (kbd "C-S-d") 'backward-delete-char) | |
| (global-set-key (kbd "C-S-f") 'kill-word) | |
| (global-set-key (kbd "C-S-b") 'backward-kill-word) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment