move stuff that doesn't need el-get higher in .emacs

This commit is contained in:
Adam Goldsmith 2015-05-03 09:45:48 -04:00
parent 4a429e868c
commit 96b79bfa84

38
.emacs
View File

@ -11,6 +11,14 @@
read-file-name-completion-ignore-case t read-file-name-completion-ignore-case t
inhibit-startup-screen t inhibit-startup-screen t
vc-follow-symlinks t) vc-follow-symlinks t)
(load-theme 'fred t)
(desktop-save-mode 1)
(savehist-mode 1)
(tool-bar-mode -1)
;; Keybinds
(global-set-key (kbd "C-z") `recompile)
(global-set-key (kbd "C-S-z") `compile)
;; save backups and autosaves in tmp ;; save backups and autosaves in tmp
(setq backup-directory-alist (setq backup-directory-alist
@ -18,6 +26,16 @@
(setq auto-save-file-name-transforms (setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t))) `((".*" ,temporary-file-directory t)))
;; use windmove to move point with shift+arrow key
(when (fboundp 'windmove-default-keybindings)
(windmove-default-keybindings))
;; define function for inserting today's date
(defun insert-date ()
(interactive)
(insert (format-time-string "%Y.%m.%d")))
;; load el-get ;; load el-get
(add-to-list 'load-path "~/.emacs.d/el-get/el-get") (add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil 'noerror) (unless (require 'el-get nil 'noerror)
@ -44,6 +62,7 @@
gnuplot-mode gnuplot-mode
csharp-mode csharp-mode
markdown-mode markdown-mode
todotxt-mode
php-mode php-mode
scad-mode scad-mode
smarttabs)) smarttabs))
@ -51,24 +70,6 @@
(el-get-cleanup my-packages) (el-get-cleanup my-packages)
(el-get 'sync my-packages) (el-get 'sync my-packages)
(global-set-key (kbd "C-z") `recompile)
(global-set-key (kbd "C-S-z") `compile)
(desktop-save-mode 1)
(savehist-mode 1)
;; use windmove to move point with shift+arrow key
(when (fboundp 'windmove-default-keybindings)
(windmove-default-keybindings))
(load-theme 'fred t)
(tool-bar-mode -1)
;; define function for inserting today's date
(defun insert-date ()
(interactive)
(insert (format-time-string "%Y.%m.%d")))
;;allow saving files that need root ;;allow saving files that need root
(defun find-file-as-root(buffer) (defun find-file-as-root(buffer)
"use sudo to open a file" "use sudo to open a file"
@ -119,6 +120,7 @@
(define-key c++-mode-map (kbd "C-c o") 'ff-find-other-file) (define-key c++-mode-map (kbd "C-c o") 'ff-find-other-file)
(define-key c-mode-map (kbd "C-c h") 'c++-headers) (define-key c-mode-map (kbd "C-c h") 'c++-headers)
(define-key c++-mode-map (kbd "C-c h") 'c++-headers))) (define-key c++-mode-map (kbd "C-c h") 'c++-headers)))
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.