4 ms·
A few things I found useful: ;; fonts (if (eq window-system 'x) (set-default-font "Inconsolata-12")) ;; no tabs, spaces instead! (setq-default i
by Kototama 16y ago
A few things I found useful:
;; fonts
(if (eq window-system 'x)
(set-default-font "Inconsolata-12"))
;; no tabs, spaces instead!
(setq-default indent-tabs-mode nil)
;; Changes all yes/no questions to y/n type
(fset 'yes-or-no-p 'y-or-n-p)
;; default modes
(iswitchb-mode t)
(icomplete-mo)
(column-number-mode)
(ido-mode)
(tabbar-mode)
(winner-mode)
;; ido-mode
;; do not confirm file creation
(setq confirm-nonexistent-file-or-buffer nil)
;; integrate copy/paste with X
(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
;; scroll
(setq scroll-step 1)
;; save backup files in this directory
(setq backup-directory-alist (quote ((".*" . "~/.emacs.d/backups/"))))
;; global bindings
(global-set-key [C-tab] 'other-window)
(global-set-key "\r" 'newline-and-indent)
(global-set-key (kbd "C-;") 'comment-region)
(global-set-key (kbd "<f8>") '(lambda ()
(interactive)
(split-window-vertically 25)
(other-window 1)
(slime)))
; switch buffer with last previous buffer
(global-set-key (kbd "<C-return>") '(lambda ()
(interactive)
(switch-to-buffer nil)))
(global-set-key (kbd "C-p") 'backward-char)
(global-set-key (kbd "C-S-p") 'previous-line)
(global-set-key (kbd "C-S-j") 'join-line)
(global-set-key (kbd "C-<prior>") 'tabbar-forward)
(global-set-key (kbd "C-<next>") 'tabbar-backward)
;; fullscreen on F11
(defun toggle-fullscreen (&optional f)
(interactive)
(let ((current-value (frame-parameter nil 'fullscreen)))
(set-frame-parameter nil 'fullscreen
(if (equal 'fullboth current-value)
(if (boundp 'old-fullscreen) old-fullscreen nil)
(progn (setq old-fullscreen current-value)
'fullboth)))))
(global-set-key [f11] 'toggle-fullscreen)
http://github.com/kototama/unixconf/blob/master/.emacs http://github.com/kototama/unixconf/blob/master/.emacs