Created
October 7, 2016 09:00
-
-
Save ajoyoommen/8997985e91a5b24cb6d244c9774fd70a to your computer and use it in GitHub Desktop.
Emacs configuration files
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
;; Disbale CTRL Z | |
(global-unset-key (kbd "C-z")) | |
;; Show line number and column number at bottom | |
(setq line-number-mode t) | |
(setq column-number-mode t) | |
;; setup package repositories | |
(when (>= emacs-major-version 24) | |
(require 'package) | |
(package-initialize) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(add-to-list 'package-archives | |
'("marmalade" . "http://marmalade-repo.org/packages/") t) | |
) | |
;; Invoke js2-mode on js files | |
(add-to-list 'auto-mode-alist '("\\.js\\`" . js2-mode)) | |
;; Delete trailing whitespaces before saving | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
;; Setup ido | |
(require 'ido) | |
(ido-mode t) | |
;; Show line numbers when python | |
(global-linum-mode 1) | |
;;(add-hook 'python-mode-hook 'linum-mode) | |
;; Highlight characters that go beyond 80th column | |
(require 'whitespace) | |
(setq whitespace-style '(face empty lines-tail trailing)) | |
(global-whitespace-mode t) | |
;; Setup web mode | |
(require 'web-mode) | |
(setq web-mode-markup-indent-offset 2) | |
(add-to-list 'auto-mode-alist '("\\.tpl\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.hbs\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.css\\'" . web-mode)) | |
(add-to-list 'auto-mode-alist '("\\.js\\'" . web-mode)) | |
(setq web-mode-engines-alist | |
'(("jinja" . "\\.tpl\\'")) | |
) | |
(setq-default indent-tabs-mode nil) | |
(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. | |
) | |
(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. | |
'(ansi-color-faces-vector | |
[default default default italic underline success warning error]) | |
'(custom-enabled-themes (quote (wombat))) | |
'(global-whitespace-mode t)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment