Difference between revisions of "Configure .emacs file"
From Notes_Wiki
m |
m |
||
Line 24: | Line 24: | ||
(set-face-attribute 'default nil :height 160) | (set-face-attribute 'default nil :height 160) | ||
;;Setting up Emacs for use with Erlang | ;;Setting up Emacs for use with Erlang | ||
Line 39: | Line 37: | ||
(setq erlang-man-root-dir "/usr/local/lib/erlang/man") | (setq erlang-man-root-dir "/usr/local/lib/erlang/man") | ||
;;Disable splash screen at start-up | |||
(setq inhibit-splash-screen t) | |||
;;Make emacs copy-paste M-w, C-y work with system copy-paste | ;;Make emacs copy-paste M-w, C-y work with system copy-paste | ||
(setq x-select-enable-clipboard t) | (setq x-select-enable-clipboard t) | ||
;;To maximize emacs window at start-up | |||
(defun toggle-fullscreen () | |||
(interactive) | |||
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32 | |||
'(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0)) | |||
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32 | |||
'(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0)) | |||
) | |||
(toggle-fullscreen) | |||
</pre> | </pre> | ||
Revision as of 06:39, 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) ;;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") ;;Disable splash screen at start-up (setq inhibit-splash-screen t) ;;Make emacs copy-paste M-w, C-y work with system copy-paste (setq x-select-enable-clipboard t) ;;To maximize emacs window at start-up (defun toggle-fullscreen () (interactive) (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0)) (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0)) ) (toggle-fullscreen)
If you have installed ELPA (Emacs Lisp Package Archive) then it might have added few lines of its own.