Skip to content

Instantly share code, notes, and snippets.

@javiergarciad
Last active April 21, 2017 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javiergarciad/15c43366408c7350feeef562b426af45 to your computer and use it in GitHub Desktop.
Save javiergarciad/15c43366408c7350feeef562b426af45 to your computer and use it in GitHub Desktop.
Emacs init
;;;; Javier's .emacs file
;;; Javier Garcia
;;; 18 April 2017
;;;;-------------------------------------------
;;;; GENERAL SETTINGS
;;;;-------------------------------------------
;; UTF-8 as default encoding
(set-language-environment "UTF-8")
;; set default directory
(setq default-directory "~/")
;; Set the load path
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
;; Disable splash screen
(setq inhibit-startup-message t
inhibit-startup-echo-area-message t)
;;;;-------------------------------------------
;;;; WINDOWS SIZE
;;;;-------------------------------------------
(set-frame-position (selected-frame) 0 0)
;; initial window
(setq initial-frame-alist
'(
(width . 91) ; character
(height . 40) ; lines
))
;; default/sebsequent window
(setq default-frame-alist
'(
(width . 90) ; character
(height . 40) ; lines
))
;;;;-------------------------------------------
;;;; PACKAGE MANAGMENT
;;;;-------------------------------------------
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/")
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
;;;;-------------------------------------------
;;;; THEMES
;;;;-------------------------------------------
;; taken from: https://github.com/bbatsov/solarized-emacs
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
;; make the fringe stand out from the background
(setq solarized-distinct-fringe-background t)
;; Don't change size of org-mode headlines (but keep other size-changes)
(setq solarized-scale-org-headlines nil)
(load-theme 'solarized-light t)
;;;;-------------------------------------------
;;;; OTHER THINGS
;;;;-------------------------------------------
;;; turn on highlight matching brackets when cursor is on one
(show-paren-mode 1)
(setq show-paren-style 'parenthesis) ; highlight brackets
;;(setq show-paren-style 'expression) ; highlight entire expression
;;(setq show-paren-style 'mixed) ; highlight brackets if visible, else entire expression
; Enable lines numbers
;(global-linum-mode 1)
; Enable IDO
(ido-mode 1)
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
;;;Making Emacs autoindent
(define-key global-map (kbd "RET") 'newline-and-indent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment