diff options
Diffstat (limited to '.emacs')
-rw-r--r-- | .emacs | 127 |
1 files changed, 59 insertions, 68 deletions
@@ -1,82 +1,73 @@ -(add-to-list 'load-path "~/.emacs.d") - -;; Requires (require 'paren) (require 'uniquify) -(require 'autopair) -(require 'color-theme) - -;; Autoloads -(autoload 'vala-mode - "vala-mode.el" "A Major mode for editing Vala files" t) -(autoload 'csharp-mode - "csharp-mode.el" "A Major mode for editing C# files" t) -(autoload 'javascript-mode - "javascript.el" "A Major mode for editing JavaScript files" t) -(autoload 'sqlplus-mode - "sqlplus,el" "A Major mode for communicating with Oracle" t) -(autoload 'batch-mode - "batch-mode.el" "A Major mode for editing Batch files" t) -(autoload 'rainbow-mode - "rainbow-mode.el" "A Minor mode for showing colors inline" t) -;; Functions -(defun what-face (pos) - "Find out which face the current position uses" - (interactive "d") - (let ((face (or (get-char-property (point) 'read-face-name) - (get-char-property (point) 'face)))) - (if face (message "Face: %s" face) (message "No face at %d" pos)))) +(load-file "~/.emacs.d/include.el") -(defun my-comp-finish-function (buf str) - (if (string-match "exited abnormally" str) - ;; there were errors - (message "compilation errors, press C-x ` to visit") - ;; no errors, make the compilation window go away in 0.5 seconds - (run-at-time 0.5 nil 'delete-windwos-on buf) - (message "NO COMPILATION ERRORS!"))) - -;; Platform specifics (if (eq system-type 'gnu/linux) ; if we're running linux - (set-default-font "-xos4-terminus-medium-*-*-*-14-*-*-*-*-*-*-*")) - -;; Variables -(setq - inhibit-startup-message t ; don't show welcom screen - require-final-newline t ; always append a newline to a file, if it doesn't have one - font-lock-maximum-decoration t ; denotes my interest in maximum possible fontification - uniquify-buffer-name-style 'reverse ; reverse uniquify file names - backup-directory-alist `((".*" . ,temporary-file-directory)) ; backup filelocation - auto-save-file-name-transforms `((".*" ,temporary-file-directory t)) ; autosave file location - compilation-finish-function 'my-comp-finish-function) ; show short message after compilation + (load-file "~/.emacs.d/linux/.emacs")) -(setq-default indent-tabs-mode nil) ; spaces, no tabs - -(fset 'yes-or-no-p 'y-or-n-p) ; switch yes or no answers to y or n answers - -;; Mode settings -( tool-bar-mode -1) ; no toolbar -( menu-bar-mode -1) ; no menu -( line-number-mode -1) ; don't show line numbers in splitter -( global-linum-mode t) ; show line numbers in gutter -( column-number-mode t) ; show column numbers in splitter -(global-font-lock-mode t) ; show syntax highlighting -( show-paren-mode t) ; show matching parens -( autopair-global-mode) ; enable autopair mode -(delete-selection-mode t) ; delete selection upon typing +(setq inhibit-startup-message t) ; don't show welcome +(setq-default indent-tabs-mode nil) ; spaces, no tabs +(tool-bar-mode nil) ; no toolbar +(menu-bar-mode nil) ; no menu +(line-number-mode nil) ; don't show line numbers in splitter +(global-linum-mode t) ; show line numbers in gutter +(column-number-mode t) ; show column numbers in splitter +(color-theme-weirdness) ; my theme +(global-font-lock-mode t) ; always show syntax higlighting, this may + ; be old +(fset 'yes-or-no-p 'y-or-n-p) ; don't want to have to type yes or no +(setq require-final-newline t) ; I always get bothered by this with the likes of fstab +(show-paren-mode t) +(setq font-lock-maximum-decoration t) ; denotes our interest in maximum possible fontification +(setq uniquify-buffer-name-style 'reverse) ;; Keybindings -(global-set-key "\C-m" 'newline-and-indent) ; Automatically indent on newline +(global-set-key "\C-m" 'newline-and-indent) + +;; Autopair Mode +(autopair-global-mode) -;; File associations +;; Vala Mode (add-to-list 'auto-mode-alist '("\\.vala$" . vala-mode)) (add-to-list 'auto-mode-alist '("\\.vapi$" . vala-mode)) -(add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)) -(add-to-list 'auto-mode-alist '("\\.bat$" . batch-mode)) - (add-to-list 'file-coding-system-alist '("\\.vala$" . utf-8)) (add-to-list 'file-coding-system-alist '("\\.vapi$" . utf-8)) -;; Color theme -(require 'color-theme-weirdness) -(color-theme-weirdness) +;; C# Mode +(setq auto-mode-alist (cons `("\\.cs\\'" . csharp-mode) auto-mode-alist)) + +;; Batch Mode +(setq auto-mode-alist (cons `("\\.bat\\'" . batch-mode) auto-mode-alist)) + +;; Autosave location +(setq backup-directory-alist + `((".*" . ,temporary-file-directory))) +(setq auto-save-file-name-transforms + `((".*" ,temporary-file-directory t))) + +;; Autocomplete +(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict") +(ac-config-default) + +;; ide-skel +(global-set-key [f4] 'ide-skel-proj-find-files-by-regexp) +(global-set-key [f5] 'ide-skel-proj-grep-files-by-regexp) +(global-set-key [f10] 'ide-skel-toggle-left-view-window) +(global-set-key [f11] 'ide-skel-toggle-bottom-view-window) +(global-set-key [f12] 'ide-skel-toggle-right-view-window) +(global-set-key [C-next] 'tabbar-backward) +(global-set-key [C-prior] 'tabbar-forward) + +(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. + ) +(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. + ) |