.emacs
(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. '(c-basic-offset 3) '(column-number-mode t) '(cua-mode t nil (cua-base)) '(scroll-bar-mode nil) '(tool-bar-mode nil) '(transient-mark-mode t)) ;;================================================ ;; server mode (server-start) ;; custimizations (setq inhibit-startup-message t) (setq default-truncate-lines t) (setq default-tab-width 4) (setq dabbrev-case-replace nil) ; make sure case is preserved when expanding ;; from http://geosoft.no/development/emacs.html (setq search-highlight t) ; Highlight search object (setq query-replace-highlight t) ; Highlight query object (setq mouse-sel-retain-highlight t) ; Keep mouse high-lightening ;;================================================ ;; Behaviour ;; from http://www.postulate.org/emacs.php ;; don't automatically add new lines when scrolling down at ;; the bottom of a buffer (setq next-line-add-newlines nil) ;; scroll just one line when hitting the bottom of the window (setq scroll-step 1) (setq scroll-conservatively 1) ;; move around a little (defun cursor-up-slightly () (interactive) (previous-line 7)) (defun cursor-down-slightly () (interactive) (next-line 7)) (global-set-key [C-down] 'cursor-down-slightly) (global-set-key [C-up] 'cursor-up-slightly) (defun scroll-up-slightly () (interactive) (scroll-up 7)) (defun scroll-down-slightly () (interactive) (scroll-down 7)) (global-set-key [M-down] 'scroll-down-slightly) (global-set-key [M-up] 'scroll-up-slightly) (defun scroll-right-slightly () (interactive) (scroll-right 5)) (defun scroll-left-slightly () (interactive) (scroll-left 5)) (global-set-key [M-right] 'scroll-right-slightly) (global-set-key [M-left] 'scroll-left-slightly) ;; do scroll horizontally when at edge of screen (setq auto-hscroll-mode t) (setq hscroll-margin 0) ;;================================================ ;; key bindings (global-set-key "\C-f" 'isearch-forward) (global-set-key "\C-s" 'save-buffer) (global-set-key "\C-w" 'kill-this-buffer) (global-set-key [C-prior] 'previous-buffer) ; that's CTRL+PGUP (global-set-key [C-next] 'next-buffer) ; that's CTRL+PGDOWN (global-set-key "\M- " 'dabbrev-expand) ;;================================================ ;; cc mode (setq c-default-style '((c-mode . "bsd"))) ;;================================================ ;; setup frame position and size (setq initial-frame-alist '((top . 0) (left . 600) (width . 80) (height . 60))) (setq default-frame-alist '((top . 0) (left . 0) (width . 80) (height. 40) ) )
Related posts
- Colorized, interactive "git blame" in Emacs: vc-annotate — posted 2011-05-28
- My Emacs Python environment — posted 2010-05-10
- Emacs espresso-mode for jQuery — posted 2010-03-10
- Notes on C++ development with Emacs on Ubuntu Linux — posted 2009-07-08
- Creating remote server nicknames with .ssh/config — posted 2008-11-20
- Emacs notes — posted 2008-11-03
Post a comment
About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(5)
-
aws
(9)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(13)
-
conkeror
(2)
-
core
(2)
-
cygwin
(17)
-
datastructures
(14)
-
datetime
(4)
-
decorators
(4)
-
django
(40)
-
emacs
(22)
-
files_directories
(11)
-
git
(5)
-
hardware
(5)
-
install_setup
(8)
-
javascript
(3)
-
keyboard
(9)
-
matplotlib
(5)
-
mercurial
(4)
-
nginx
(2)
-
persistence
(5)
-
preferences
(7)
-
processes
(4)
-
pyqt
(18)
-
python
(144)
-
ratpoison
(3)
-
regexes
(6)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(14)
-
ssh
(10)
-
subversion
(6)
-
twisted
(7)
-
ubuntu
(65)
-
urxvt
(5)
-
vxworks
(25)
-
webdev
(5)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Marty Alchin
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan