Skip to content

Instantly share code, notes, and snippets.

@stedolan
Created October 3, 2012 12:13
Show Gist options
  • Save stedolan/3826620 to your computer and use it in GitHub Desktop.
Save stedolan/3826620 to your computer and use it in GitHub Desktop.
Emacs
(require 'uniquify)
(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.
'(dabbrev-case-fold-search nil)
'(doc-view-resolution 100)
'(ecb-options-version "2.32")
'(indent-tabs-mode nil)
'(inhibit-startup-screen t)
'(jde-jdk-registry (quote (("1.6.0.26" . "/usr/lib/jvm/java-6-sun-1.6.0.26"))))
'(load-home-init-file t t)
'(menu-bar-mode nil)
'(mouse-wheel-follow-mouse t)
'(mouse-wheel-mode t nil (mwheel))
'(mouse-wheel-progressive-speed nil)
'(mouse-wheel-scroll-amount (quote (1 ((shift) . 5) ((control)))))
'(scroll-bar-mode (quote right))
'(scroll-conservatively 20)
'(scroll-down-aggressively 0.0)
'(server-done-hook (quote (delete-frame)))
'(server-visit-hook (quote (make-frame-command)))
'(server-window nil)
'(tabbar-mode t nil (tabbar))
'(tabbar-mwheel-mode t nil (tabbar))
'(tabbar-separator (quote (0.5)))
'(tool-bar-mode nil)
'(uniquify-buffer-name-style (quote forward) nil (uniquify))
'(woman-use-own-frame nil))
(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.
'(default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 80 :width normal :foundry "unknown" :family "DejaVu Sans Mono"))))
'(scroll-bar ((t (:background "grey75")))))
(global-font-lock-mode 't)
(global-set-key [mouse-3] 'mouse-popup-menubar-stuff)
;;(defun close-emacs ()
;; (interactive)
;; (cond
;; ((and (boundp 'server-clients) server-clients)
;; (server-edit))
;; (t (save-buffers-kill-emacs))))
;;(global-set-key (kbd "C-x C-c") 'close-emacs)
(add-hook 'c-mode-common-hook
'(lambda ()
(define-key c-mode-map "\C-c\C-f" 'ff-find-other-file)
(define-key c-mode-map "\C-cf" 'ff-find-other-file)))
(put 'narrow-to-region 'disabled nil)
(when (fboundp 'windmove-default-keybindings)
(windmove-default-keybindings))
;;in the .emacs
;(require 'ido)
;(ido-mode t)
;(setq ido-enable-flex-matching t) ;; enable fuzzy matching
(setq load-path
(cons (expand-file-name "/home/stephen/projects/fyp/llvm/utils/emacs") load-path))
(setq load-path
(cons (expand-file-name "/home/stephen/.emacs.d") load-path))
;;(require 'llvm-mode)
;;(require 'tablegen-mode)
(setq transient-mark-mode nil)
(add-hook 'term-mode-hook
'(lambda ()
(term-set-escape-char ?\C-x)))
(setq x-select-enable-clipboard t)
(tabbar-mode 1)
(set-face-attribute
'tabbar-default nil
:background "gray60"
:height 90)
(set-face-attribute
'tabbar-unselected nil
:background "gray85"
:foreground "gray30"
:box nil)
(set-face-attribute
'tabbar-selected nil
:background "#f2f2f6"
:foreground "black"
:box nil)
(set-face-attribute
'tabbar-button nil
:box '(:line-width 1 :color "gray72" :style released-button))
(set-face-attribute
'tabbar-separator nil
:height 0.7)
(global-set-key (kbd "C-<next>") 'tabbar-forward-tab)
(global-set-key (kbd "C-<prior>") 'tabbar-backward-tab)
(require 'buffer-move)
(global-set-key (kbd "<M-S-up>") 'buf-move-up)
(global-set-key (kbd "<M-S-down>") 'buf-move-down)
(global-set-key (kbd "<M-S-left>") 'buf-move-left)
(global-set-key (kbd "<M-S-right>") 'buf-move-right)
(fringe-mode 'right-only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment