Difference between revisions of "Configure .emacs file"
From Notes_Wiki
|  (Created page with "=Configure .emacs file=  Use following as <tt>.emacs</tt> configuration. If there are already few lines in .emacs file then these lines can be appended / prepended to existing...") | m | ||
| Line 24: | Line 24: | ||
| (set-face-attribute 'default nil :height 160)   | (set-face-attribute 'default nil :height 160)   | ||
| ;;Disable splash screen http://frankschmitt.org/2007/12/howto-disable-the-annoying-new-emacs-splash-screen | |||
| (setq inhibit-splash-screen t) | |||
| ;;Setting up Emacs for use with Erlang | ;;Setting up Emacs for use with Erlang | ||
Revision as of 06:33, 18 December 2012
Configure .emacs file
Use following as .emacs configuration. If there are already few lines in .emacs file then these lines can be appended / prepended to existing file:
(setq load-path (cons "~/.emacs.d" load-path))
;;Preventing emacs from creating backup files
(setq make-backup-files nil)
;;Preventing emacs from creating auto-save files
(setq auto-save-default nil)
;;Use visual-line-mode for word wrap
(global-visual-line-mode 1)
;;Wrap lines at 60 columns
(set-fill-column 60)
;;Wrap lines at 60 columns and enable auto-fill-mode automatically
(setq-default fill-column 60)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;;Set default font-size to 160 (16pt)
(set-face-attribute 'default nil :height 160) 
;;Disable splash screen http://frankschmitt.org/2007/12/howto-disable-the-annoying-new-emacs-splash-screen
(setq inhibit-splash-screen t)
;;Setting up Emacs for use with Erlang
;;Update the below mentioned paths appropriately based on installation
(add-to-list 'load-path "/usr/local/lib/erlang/lib/tools-2.6.7/emacs/")
(require 'erlang-start)
(add-to-list 'auto-mode-alist '("\\.erl?$" . erlang-mode))
(add-to-list 'auto-mode-alist '("\\.hrl?$" . erlang-mode))
(setq erlang-root-dir "/usr/local/lib/erlang")
(add-to-list 'exec-path "/usr/local/lib/erlang/bin")
(setq erlang-man-root-dir "/usr/local/lib/erlang/man")
;;Make emacs copy-paste M-w, C-y work with system copy-paste
(setq x-select-enable-clipboard t)
If you have installed ELPA (Emacs Lisp Package Archive) then it might have added few lines of its own.

