;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Pioz's EMACS configuration file ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Set font ; (set-default-font "-misc-fixed-medium-r-normal--10-100-75-75-c-60-iso8859-10") ;; Enable color selection (setq-default transient-mark-mode t) ;; Show paren highlight (show-paren-mode t) ;; Hidden scroll bar (toggle-scroll-bar nil) ;; Enable color current line (global-hl-line-mode t) ;; No splash screen (setq inhibit-splash-screen t) ;; Hidden toolbar (tool-bar-mode -1) ;; Hidden menubar ; (menu-bar-mode -1) ;; Set side borders width (set-fringe-mode 1) ;; Disable backups (setq backup-inhibited t) ;; Disable auto-save (auto-save-mode -1) ;; Set colors (add-to-list 'default-frame-alist '(foreground-color . "green")) (add-to-list 'default-frame-alist '(background-color . "black")) ;; Shortcut (global-set-key "\C-r" 'replace-string) (global-set-key "\C-q" 'query-replace) (global-set-key "\C-cl" 'goto-line) (global-set-key "\C-z" 'other-window) (global-set-key "\C-x`" 'kill-this-buffer) ;; Auto insert mode (add-hook 'find-file-hooks 'auto-insert) (load-library "autoinsert") (setq auto-insert-directory "~/.emacs.d/auto-insert/") (setq auto-insert-alist (append '((c-mode . "c-header")) '((ada-mode . "ada-header")) ;; other mode auto-insert-alist) ) ;; Full screen (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) ;; Org-mode (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) (global-font-lock-mode 1) (add-hook 'org-mode-hook 'turn-on-font-lock) ;-*- mode: org; -*- (transient-mark-mode 1) ;; Twitter (add-to-list 'load-path "~/.emacs.d/") (autoload 'twit-show-recent-tweets "twit" "" t) (autoload 'twit-show-at-tweets "twit" "" t) (autoload 'twit-show-friends "twit" "" t) (autoload 'twit-show-followers "twit" "" t) (autoload 'twit-follow-recent-tweets "twit" "" t) (autoload 'twit-post "twit" "" t) (autoload 'twit-post-region "twit" "" t) (autoload 'twit-post-buffer "twit" "" t) (autoload 'twit-direct "twit" "" t) (autoload 'twit-add-favorite "twit" "" t) (autoload 'twit-remove-favorite "twit" "" t) (autoload 'twit-add-friend "twit" "" t) (autoload 'twit-remove-friend "twit" "" t) (autoload 'twit-switch-account "twit" "" t) (autoload 'twit-direct-with-account "twit" "" t) (autoload 'twit-post-with-account "twit" "" t) (autoload 'twit-show-direct-tweets-with-account "twit" "" t) (autoload 'twit-show-at-tweets-with-account "twit" "" t) (setq twit-user "USERNAME") (setq twit-pass "PASSWORD") (global-set-key "\C-cts" 'twit-follow-recent-tweets) (global-set-key "\C-cTsa" 'twit-show-at-tweets) (global-set-key "\C-ctp" 'twit-post) (global-set-key "\C-ctr" 'twit-post-region) (global-set-key "\C-cTpb" 'twit-post-buffer) (global-set-key "\C-cTpr" 'twit-direct) (global-set-key "\C-cTfa" 'twit-add-favorite) (global-set-key "\C-cTfr" 'twit-remove-favorite) ;; Speedbar ;(speedbar 1) ;; Close 'Messages' buffer (kill-buffer "*Messages*")