emacs configuration with
recursively added load path
ruby-mode
python-mode
plsql-mode
mouse wheel scrolling
color theme <br>
and more
font change
(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.
'(case-fold-search t)
'(column-number-mode t)
'(current-language-environment "UTF-8")
'(default-input-method "rfc1345")
'(global-font-lock-mode t nil (font-lock))
'(inhibit-splash-screen t)
'(scroll-bar-mode (quote right))
'(show-paren-mode t)
'(tab-always-indent nil)
'(tool-bar-mode nil)
'(transient-mark-mode t))
'(next-line-add-newlines nil)
'(message-log-max 512)
(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.
)
;; apt-get install ruby-elisp
;; recursively add ~/elisp to the load path
(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
(let* ((my-lisp-dir "~/elisp/")
(default-directory my-lisp-dir))
(setq load-path (cons my-lisp-dir load-path))
(normal-top-level-add-subdirs-to-load-path)))
;; add automagic python load
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
;; enable mouse scrolling
(mouse-wheel-mode t)
;; quit message
(fset 'yes-or-no-p 'y-or-n-p)
;; will highlight region between point and mark.
;; (transient-mark-mode t)
(resize-minibuffer-mode 1) ;; minibuffer gets resized if it becomes too big
;; Moving cursor down at bottom scrolls only a single line, not half page
(setq scroll-step 1)
(setq scroll-conservatively 5)
;; set default mode
(setq default-major-mode 'text-mode)
(setq initial-major-mode 'text-mode)
(setq make-backup-files nil) ; don't make backup files
(setq delete-auto-save-files t) ; no "#" files after a save
(setq auto-save-list-file-prefix nil) ; don't record sessions
;; ===== Set standard indent to 2 rather that 4 ====
(setq standard-indent 2)
;; When saving files, set execute permission if #! is in first line.
(add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)
;; show matching parens
(require 'paren) (show-paren-mode t)
;; turn off tab char
(setq-default indent-tabs-mode nil)
;; Show line-number in the mode line
(line-number-mode 1)
;; Show column-number in the mode line
(column-number-mode 1)
;; set the fill column
(setq-default fill-column 72)
;; turn on auto fill in all lmodes
(setq auto-fill-mode 1)
;; ===== Set standard indent to 2 rather that 4 ====
(setq standard-indent 2)
;; PL SQL
(autoload 'plsql-mode "plsql" "PL/SQL Mode." t)
(add-to-list 'auto-mode-alist '("\\.pls\\'" . plsql-mode))
;; change the ugly font
(set-default-font "9x15") ;; Linux
;; load deep blue gtk ide color theme
(require 'color-theme)
(color-theme-gtk-ide)
;; bind execution of current buffer to key
;; (defun robert-execute-buffer ()
;; (interactive)
;; (split-window-vertically)
;; (set-window-buffer (next-window) (other-buffer)))
;; (global-set-key "\C-x2" 'robert-execute-buffer)