]> git.rkrishnan.org Git - .emacs.d.git/blobdiff - init.el
add dumb-jump mode
[.emacs.d.git] / init.el
diff --git a/init.el b/init.el
index 0fdc0676c9df8216119f6476bd9d5022fdaf738e..638d24df44275ec1c76a66a572e790ee9d8d833c 100644 (file)
--- a/init.el
+++ b/init.el
-(setq load-path (cons "~/.emacs.d/emacs" load-path))
-
-;; color themes
-(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
-;(load-theme 'zenburn t)
-
-(require 'package)
 (package-initialize)
-(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
-
-(load "my-c-mode.el")
-(load "my-generic-stuff.el")
-(load "my-search.el")
-(load "my-erc.el")
-(load "my-org-mode.el")
-(load "my-slime.el")
-(load "my-twitter.el")
-(load "my-python.el")
-(load "my-haskell.el")
-(load "my-swank-js.el")
-
-;; setup font
-(if (>= emacs-major-version 23)
-    (setq default-frame-alist '((font . "Inconsolata-14")))
-  (set-default-font
-   "-Misc-Fixed-Medium-R-Normal--15-140-75-75-C-90-ISO8859-1"))
-
-(setq-default indent-tabs-mode nil)
-(add-hook 'emacs-lisp-mode-hook
-         (lambda () (which-function-mode t)))
-
-;; iswitch
-(iswitchb-mode 1)
-
-;; smooth scroll
-(setq scroll-conservatively 1)
-(put 'upcase-region 'disabled nil)
-(put 'downcase-region 'disabled nil)
-
-;; cscope
-(require 'xcscope)
-
-(defun match-paren (arg)
-  "Go to the matching paren if on a paren; otherwise insert %."
-  (interactive "p")
-  (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
-       ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
-       (t (self-insert-command (or arg 1)))))
-
-;; emacs window size according to screen resolution
-;; from stackoverflow.com
-;;  - <http://stackoverflow.com/questions/92971/how-do-i-set-the-size-of-emacs-window>
-(defun set-frame-size-according-to-resolution ()
-  (interactive)
-  (if window-system
-      (progn
-       ;; use 120 char wide window for largeish displays
-       ;; and smaller 80 column windows for smaller displays
-       ;; pick whatever numbers make sense for you
-       (if (> (x-display-pixel-width) 1280)
-           (add-to-list 'default-frame-alist (cons 'width 80))
-         (add-to-list 'default-frame-alist (cons 'width 78)))
-       ;; for the height, subtract a couple hundred pixels
-       ;; from the screen height (for panels, menubars and
-       ;; whatnot), then divide by the height of a char to
-       ;; get the height we want
-       (add-to-list 'default-frame-alist
-                    (cons 'height (/ (- (x-display-pixel-height) 0) (frame-char-height)))))))
-
-(set-frame-size-according-to-resolution)
-
-;; tramp
-(require 'tramp)
- (setq tramp-default-method "ssh")
-
-;; cut and paste with the rest of ecosystem in X
-(setq x-select-enable-clipboard t)
-
-;; remove toolbar
-(if (> emacs-major-version 20)
-    (tool-bar-mode -1))
-
-;; clojure mode
-(add-to-list 'load-path "~/.emacs.d/vendor/clojure-mode")
-(require 'clojure-mode)
-
-;; highlight parentheses mode
-(require 'highlight-parentheses)
-
-;; rainbow effect
-;; http://stackoverflow.com/questions/2413047/how-do-i-get-rainbow-parentheses-in-emacs
-;; (setq hl-paren-colors
-;;       '(;"#8f8f8f" ; this comes from Zenburn
-;;                    ; and I guess I'll try to make the far-outer parens look like this
-;;         "orange1" "yellow1" "greenyellow" "green1"
-;;         "springgreen1" "cyan1" "slateblue1" "magenta1" "purple"))
-
-;; paredit
-(autoload 'paredit-mode "paredit"
-  "Minor mode for pseudo-structurally editing Lisp code." t)
-
-(dolist (hook '(emacs-lisp-mode-hook
-                lisp-mode-hook
-                lisp-interaction-mode-hook
-                clojure-mode-hook
-                scheme-mode-hook))
-  (add-hook hook #'(lambda ()
-                     (highlight-parentheses-mode t)
-                     (paredit-mode +1))))
-;; clojure-test-mode
-(autoload 'clojure-test-mode "clojure-test-mode" "Clojure test mode" t)
-(autoload 'clojure-test-maybe-enable "clojure-test-mode" "" t)
-(add-hook 'clojure-mode-hook 'clojure-test-maybe-enable)
-
-;; flyspell
-(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
-
-;;; fullscreen mode
-(defun switch-full-screen ()
-  (interactive)
-  (shell-command "wmctrl -r :ACTIVE: -btoggle,fullscreen"))
+(show-paren-mode 1)
+;; y-or-n instead of yes-or-no
+(defalias 'yes-or-no-p 'y-or-n-p)
 
-(global-set-key [f10] 'switch-full-screen)
+;; Don't show startup msg, don't store tilde files
+(setq make-backup-files nil)
+(setq initial-scratch-message "")
+(setq inhibit-startup-message t)
 
-;; gist integration
-(require 'gist)
+(setq initial-frame-alist (quote ((fullscreen . maximized))))
+(setq send-mail-function (quote smtpmail-send-it))
 
-;; browse url
-(setq browse-url-browser-function 'browse-url-firefox
-;      browse-url-generic-program "/usr/bin/iceweasel"
-      browse-url-new-window-flag  t
-      browse-url-firefox-new-window-is-tab t)
-(define-key global-map "\C-co" 'browse-url-at-point)
+;; turn OFF syntax highlighting
+;; (global-font-lock-mode 0)
 
-;; nxml for editing xml files
-(setq auto-mode-alist
-      (cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode)
-            auto-mode-alist))
+;; cursor bar
+(setq-default cursor-type '(bar . 2))
 
-;; completions enhancements
-(icomplete-mode t)
+;; column number
+(column-number-mode 1)
+
+;; font
+;; (set-default-font "Inconsolata-12")
+;; (set-default-font "InconsolataGo-12")
+;; set a default font
+(when (member "DejaVu Sans Mono" (font-family-list))
+  (set-face-attribute 'default nil :font "DejaVu Sans Mono-11"))
+
+;; Don't let Emacs hurt your ears
+(setq visible-bell t)
+
+;; Who use the bar to scroll?
+(when (display-graphic-p)
+  (progn
+    (scroll-bar-mode 0)
+
+    (tool-bar-mode 0)
+    (menu-bar-mode 0)))
+
+;; tangotango
+;;(load-theme 'tangotango t)
+;; (load-theme 'railscasts t)
+(load-theme 'leuven t)
+
+;; erc
+(require 'erc)
+(require 'tls)
+;; (setq tls-program '("openssl s_client -connect %h:%p -no_ssl2 -ign_eof"))
+
+(erc-autojoin-mode t)
+(setq erc-autojoin-channels-alist
+      '((".*\\.freenode.net" "#tahoe-lafs")
+        (".*\\.oftc.net" "#leastauthority")
+        ;;(".*\\.mozilla.org" "#rust-beginners")
+        ))
+
+;; check channels
+(erc-track-mode t)
+(setq erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
+                                 "324" "329" "332" "333" "353" "477"))
+;; don't show any of this
+(setq erc-hide-list '("JOIN" "PART" "QUIT" "NICK"))
+
+(defun start-erc ()
+  "Connect to IRC."
+  (interactive)
+  (when (y-or-n-p "Do you want to start IRC? ")
+    ;; (erc-tls :server "irc.mozilla.org" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")
+    (erc-tls :server "irc.freenode.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")
+    (erc-tls :server "irc.oftc.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")))
 
-;; Interactively Do Things mode
-(require 'ido)
+;; switch to ERC with Ctrl+c e
+(global-set-key (kbd "C-c e") 'start-erc) ;; ERC
 
-(ido-mode t)
+;; ido
 (setq ido-enable-flex-matching t)
-(setq ido-enable-last-directory-history nil)
-
-;; browse kill ring
-(when (require 'browse-kill-ring nil 'noerror)
-  (browse-kill-ring-default-keybindings))
-
-;; rainbox mode for CSS color highlighting
-(require 'rainbow-mode)
-
-(add-to-list 'auto-mode-alist '("\\.rkt$" . scheme-mode))
-
-;; scheme auto complete
-(require 'scheme-complete)
-(autoload 'scheme-smart-complete "scheme-complete" nil t)
-(eval-after-load 'scheme
-  '(progn (define-key scheme-mode-map "\t" 'scheme-complete-or-indent)))
-
-;; autocomplete
-(add-to-list 'load-path "~/.emacs.d/vendor/popup/")
-(add-to-list 'load-path "~/.emacs.d/vendor/auto-complete/")
-(require 'auto-complete)
-
-(set-default 'ac-sources
-             '(ac-source-abbrev
-               ac-source-dictionary
-               ac-source-yasnippet
-               ac-source-words-in-buffer
-               ac-source-words-in-same-mode-buffers
-               ac-source-semantic))
+(setq ido-everywhere t)
+(ido-mode 1)
 
-(dolist (m '(c-mode c++-mode java-mode))
-  (add-to-list 'ac-modes m))
-
-(global-auto-complete-mode t)
-
-;; slime autocomplete
-(add-to-list 'load-path "~/.emacs.d/vendor/ac-slime/")
-
-(require 'ac-slime)
-(set-default 'ac-sources 'ac-source-slime-simple)
-(add-hook 'slime-mode-hook 'set-up-slime-ac)
-(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
-
-;; scheme/quack
-;(require 'quack)
-;(setq scheme-program-name "racket")
-;(setq quack-default-program "racket -il racket/base")
-;(setq quack-switch-to-scheme-method 'other-window)
-;(setq quack-newline-behavior 'indent-newline-indent)
-
-(defun racket-enter! ()
-  (interactive)
-  (comint-send-string (scheme-proc)
-        (format "(enter! (file \"%s\") #:verbose)\n" buffer-file-name))
-  (switch-to-scheme t))
-(local-set-key "\C-c\C-v" 'racket-enter!)
-
-;; company-mode
-(add-to-list 'load-path "~/.emacs.d/vendor/company-mode")
-(autoload 'company-mode "company" nil t)
-
-;; handle trailing whitespaces
-;(add-hook 'before-save-hook 'delete-trailing-whitespace)
-
-;; update copyright years before saving.
-;(add-hook 'before-save-hook 'copyright-update)
-
-;; la carte mode (access menu from keyboard)
-(require 'lacarte)
-
-;;; Based on code by Rudi Schlatte.
-;;; Needs this library:
-;;; http://www.emacswiki.org/cgi-bin/wiki/XmlRpc
-(require 'xml-rpc)
-
-(defvar lisppaste-nick "vu3rdd")
-(defvar lisppaste-channel "None")
-(defvar lisppaste-colorize-as "Scheme")
-(defvar lisppaste-prev-title "")
-
-(defun lisppaste-region (region-begin region-end
-                                      &optional channel username title annotate)
-  (interactive "r")
-  (let* ((content (buffer-substring region-begin region-end))
-         (channel (or channel
-                      (read-from-minibuffer "Channel: " lisppaste-channel)))
-         (username (or username (read-from-minibuffer "Nick: " lisppaste-nick)))
-         (title (or title (read-from-minibuffer "Title: " lisppaste-prev-title)))
-         (annotate (or annotate (string-to-number (read-from-minibuffer "Annotate? "))))
-         (colorize-as (if (zerop annotate) (read-from-minibuffer "Colorize as (empty for default): " lisppaste-colorize-as))))
-    (setf lisppaste-prev-title title)
-    (let* ((ret (xml-rpc-method-call "http://common-lisp.net:8185/RPC2" 'newpaste
-                                     channel username title content (or colorize-as annotate)))
-           (url-beg (search "http://" ret))
-           (url-end (and url-beg (search " " ret :start2 url-beg)))
-           (url (and url-end (substring ret url-beg url-end))))
-      (print ret)
-      (and url (browse-url url))
-      (or url ret))))
-
-;;; displays "\" at the end of lines that wrap
-(setq longlines-show-hard-newlines t)
-
-;; javascript mode
-(autoload 'js2-mode "js2-mode" nil t)
-(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
-
-;; geiser for Scheme programming
-;(load-file "~/src/geiser/elisp/geiser.el")
-
-;; geiser racket
-;(setq geiser-guile-binary "racket")
-;(setq geiser-active-implementations '(racket))
-
-;; flymake
-(require 'flymake)
-(defun flymake-racket-init ()
-  (let* ((temp-file (flymake-init-create-temp-buffer-copy
-                     'flymake-create-temp-inplace))
-         (local-file (file-relative-name
-                      temp-file
-                      (file-name-directory buffer-file-name))))
-    (list "racket" (list "-qf" local-file))))
-
-(push '("\\.rkt\\'" flymake-racket-init)
-      flymake-allowed-file-name-masks)
+;; disable tabs for indentation
+(setq-default indent-tabs-mode nil)
 
+;; (require 'whitespace)
+;; (setq whitespace-style '(face lines-tail))
+;; (setq whitespace-line-column 80)
+;; (global-whitespace-mode t)
+
+;; ;; show trailing whitespaces
+;; (setq-default show-trailing-whitespace t)
+;; (setq-default indicate-empty-lines t)
+
+;; C style
+(setq c-default-style "k&r"
+      c-basic-offset 4)
+
+;; haskell
+(setenv "PATH" (concat "~/.cabal/bin:" (getenv "PATH")))
+(add-to-list 'exec-path "~/.cabal/bin")
+(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
+
+;; haskell mode
+(require 'haskell-process)
+(require 'haskell-interactive-mode)
+(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
+
+(setq haskell-process-suggest-remove-import-lines t)
+(setq haskell-process-auto-import-loaded-modules t)
+(setq haskell-process-log t)
+
+(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
+(define-key haskell-mode-map (kbd "C-`") 'haskell-interactive-bring)
+(define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
+(define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
+(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
+(define-key haskell-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
+(define-key haskell-mode-map (kbd "C-c c") 'haskell-process-cabal)
 
 ;; ghc-mod
-(autoload 'ghc-init "ghc" nil t)
-(add-hook 'haskell-mode-hook
-          (lambda ()
-            (ghc-init)
-            (require 'auto-complete-config)
-            (auto-complete-mode t)
-            (add-to-list 'ac-sources 'ac-source-ghc-mod)))
-;; haskell-mode hooks
-(add-hook 'haskell-mode-hook 'capitalized-words-mode)
-(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
-
-;; sml
-(autoload 'sml-mode "sml-mode" "Major mode for editing SML." t)
-(autoload 'run-sml "sml-proc" "Run an inferior SML process." t)
-
-(require 'gnus-art)
-
-;; sending email
-(setq message-send-mail-function 'message-send-mail-with-sendmail
-      mail-specify-envelope-from t      ; Settings to work with msmtp
-      message-sendmail-f-is-evil nil  
-      mail-envelope-from 'header
-      message-sendmail-envelope-from 'header
-      sendmail-program "/usr/bin/msmtp"
-      user-full-name "Ramakrishnan Muthukrishnan")
+;;(autoload 'ghc-init "ghc" nil t)
+;;(autoload 'ghc-debug "ghc" nil t)
+;;(setq ghc-debug t)
+;;(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
+
+;; hlint
+(add-to-list 'load-path "~/.emacs.d/hs-lint")
+(require 'hs-lint)
+(defun my-haskell-mode-hook ()
+   (local-set-key "\C-cl" 'hs-lint))
+
+(add-hook 'haskell-mode-hook 'my-haskell-mode-hook)
+
+;; hindent
+(add-hook 'haskell-mode-hook #'hindent-mode)
+
+;; gofmt
+(add-hook 'before-save-hook #'gofmt-before-save)
+(add-hook 'go-mode-hook (lambda ()
+                          (local-set-key (kbd "C-c C-r")
+                                         'go-remove-unused-imports)))
+(add-hook 'go-mode-hook (lambda ()
+                          (local-set-key (kbd "C-c i")
+                                         'go-goto-imports)))
+
+;; asp
+(add-to-list 'load-path "~/.emacs.d/asp-mode")
+(autoload 'asp-mode "asp-mode")
+(setq auto-mode-alist
+      (cons '("\\.asp\\'" . asp-mode) auto-mode-alist))
 
-(setq message-kill-buffer-on-exit t) ; kill buffer after sending mail)
+;; line-number-mode
+(global-linum-mode t)
+(global-hl-line-mode 0)
 
+;; fci -- fill-column-indicator
+(setq fci-rule-column 81)
+(setq fci-rule-width 1)
+(setq fci-rule-color "darkblue")
 
-;; cursor
-(setq-default cursor-type '(bar . 2))
-(set-cursor-color "#ff0000")
-
-;; color theme
-
-;; wombat color theme
-;(set-background-color "Black")
-(set-background-color "#242424")
-;(set-foreground-color "White")
-(set-foreground-color "#f6f3e8")
-(set-cursor-color "Red")
-;(set-cursor-color "#656565")
-(set-mouse-color "LightSkyBlue")
-(setq font-lock-maximum-decoration t)
-(set-face-foreground 'font-lock-comment-face "#99968b")
-(set-face-italic-p 'font-lock-comment-face t)
-(set-face-foreground 'font-lock-doc-face "#99968b")
-(set-face-italic-p 'font-lock-doc-face t)
-(set-face-foreground 'font-lock-constant-face "#e5786d")
-(set-face-foreground 'font-lock-string-face "#95e454")
-(set-face-italic-p 'font-lock-string-face t)
-(set-face-foreground 'font-lock-variable-name-face "#cae682")
-(set-face-foreground 'font-lock-function-name-face "#cae682")
-(set-face-foreground 'font-lock-type-face "#cae682")
-(set-face-foreground 'font-lock-builtin-face "#8ac6f2")
-(set-face-foreground 'font-lock-keyword-face "#8ac6f2")
-(set-face-foreground 'font-lock-preprocessor-face "#e5786d")
-(set-face-foreground 'font-lock-negation-char-face "#e7f6da")
-(set-face-foreground 'link "#8ac6f2")
-(set-face-bold-p 'link t)
-(set-face-underline-p 'link t)
-(show-paren-mode t)
-(set-face-foreground 'show-paren-match-face "#f6f3e8")
-(set-face-background 'show-paren-match-face "#857b6f")
-(set-face-bold-p 'show-paren-match t)
-(set-face-foreground 'region "#f6f3e8")
-(set-face-background 'region "#444444")
-(set-face-foreground 'lazy-highlight "black")
-(set-face-background 'lazy-highlight "yellow")
-
-;; color theme from Lau Jenson
-(defun color-theme-dark-bliss ()
-  ""
-  (interactive)
-  (color-theme-install
-   '(color-theme-dark-bliss
-     ((foreground-color . "#eeeeee")
-      (background-color . "#001122")
-      (background-mode . dark)
-      (cursor-color . "#ccffcc"))
-     (bold ((t (:bold t))))
-     (bold-italic ((t (:italic t :bold t))))
-     (default ((t (nil))))
-
-     (font-lock-builtin-face ((t (:foreground "#f0f0aa"))))
-     (font-lock-comment-face ((t (:italic t :foreground "#aaccaa"))))
-     (font-lock-delimiter-face ((t (:foreground "#aaccaa"))))
-     (font-lock-constant-face ((t (:bold t :foreground "#ffaa88"))))
-     (font-lock-doc-string-face ((t (:foreground "#eeccaa"))))
-     (font-lock-doc-face ((t (:foreground "#eeccaa"))))
-     (font-lock-reference-face ((t (:foreground "#aa99cc"))))
-     (font-lock-function-name-face ((t (:foreground "#ffbb66"))))
-     (font-lock-keyword-face ((t (:foreground "#ccffaa"))))
-     (font-lock-preprocessor-face ((t (:foreground "#aaffee"))))
-     (font-lock-string-face ((t (:foreground "#bbbbff")))))))
-
-;; (color-theme-dark-bliss)
+;; turn off electric-indent-mode
+(when (fboundp 'electric-indent-mode) (electric-indent-mode -1))
 
 ;; notmuch
-(setq gnus-inhibit-images nil)
-(add-to-list 'load-path "~/.emacs.d/emacs/notmuch")
-(setq notmuch-command "/Users/rkrishnan/bin/remote-notmuch.sh")
-(require 'notmuch)
-(when (memq window-system '(mac ns))
-  (exec-path-from-shell-initialize)
-  (setq starttls-use-gnutls t)
-  (setq starttls-gnutls-program "gnutls-cli")
-  (setq starttls-extra-arguments nil)
-  )
-(setq smtpmail-starttls-credentials '(("rkrishnan.org" 587 nil nil))
-      smtpmail-auth-credentials (expand-file-name "~/.authinfo")
-      smtpmail-default-smtp-server "rkrishnan.org"
-      smtpmail-smtp-server "rkrishnan.org"
-      smtpmail-smtp-service 587)
-
-(setq notmuch-fcc-dirs nil)
-(add-hook 'message-header-setup-hook
-    (lambda () (insert (format "Bcc: %s <%s>\n"
-                (notmuch-user-name)
-                (notmuch-user-primary-email)))))
+(setq mail-user-agent 'message-user-agent)
+(setq user-mail-address "ram@rkrishnan.org"
+      user-full-name "Ramakrishnan Muthukrishnan")
+
+;; smtp
+(setq smtpmail-stream-type 'ssl
+      smtpmail-smtp-server "mail.messagingengine.com"
+      smtpmail-smtp-service 465)
 
 ;; addressbook
 (require 'notmuch-address)
-(setq notmuch-address-command "~/bin/addrlookup")
-(notmuch-address-message-insinuate)
+(setq notmuch-address-command "/usr/bin/notmuch-addrlookup")
+;;(notmuch-address-message-insinuate)
 
 (require 'smtpmail)
 (setq message-send-mail-function 'smtpmail-send-it)
 (require 'starttls)
 
 ;; sign all emails
-;(add-hook 'message-setup-hook 'mml-secure-message-sign-pgpmime)
-
-(setq default-frame-alist
-      '((font . "Menlo-13")
-        (width . 80)))
-
+(add-hook 'message-setup-hook 'mml-secure-message-sign-pgp)
+
+;; company mode for auto completion
+(add-hook 'after-init-hook 'global-company-mode)
+
+;; Reduce the time after which the company auto completion popup opens
+(setq company-idle-delay 0.2)
+
+;; Reduce the number of characters before company kicks in
+(setq company-minimum-prefix-length 1)
+
+;; Set path to racer binary
+(setq racer-cmd "/home/ram/.cargo/bin/racer")
+
+(add-hook 'rust-mode-hook
+          '(lambda ()
+             (racer-activate)
+             (racer-turn-on-eldoc)
+             (add-hook 'flycheck-mode-hook #'flycheck-rust-setup)
+             (set (make-local-variable 'company-backends) '(company-racer))
+             (local-set-key (kbd "M-.") #'racer-find-definition)
+             (local-set-key (kbd "TAB") #'racer-complete-or-indent)))
+
+;; highlight todo
+;; (add-hook 'prog-mode-hook 'highlight-todos)
+
+;; Ledger
+(setq ledger-binary-path "~/.cabal/bin/hledger")
+
+;; golang
+(setq exec-path (cons "/usr/local/go/bin" exec-path))
+(add-to-list 'exec-path (concat (getenv "GOPATH") "/bin"))
+
+(defun go-mode-setup ()
+  (go-eldoc-setup)
+  (setq gofmt-command "goimports")
+  (add-hook 'before-save-hook 'gofmt-before-save))
+
+(add-hook 'go-mode-hook 'go-mode-setup)
+
+;; alias man to w.o.man
+(defalias 'man 'woman)
+
+;; eshell aliases
+(defun eshell/emacs (&rest args)
+  "open a file in emacs"
+  (if (null args)
+      (bury-buffer)
+    (mapc #'find-file (mapcar #'expand-file-name (eshell-flatten-list (reverse args))))))
+
+;(desktop-save-mode 1)
+
+;; which function?
+(which-func-mode 1)
+(add-to-list 'which-func-modes '(c-mode c++-mode rust-mode haskell-mode))
+
+;; flysheck
+(add-hook 'after-init-hook #'global-flycheck-mode)
+
+;; org-mode
+(setq org-todo-keywords
+      '((sequence "TODO(t)" "INPROGRESS(p)" "WAITING(w)" "|" "DONE" "CANCELLED")))
+
+(setq org-agenda-files '("~/src/org/"))
+(add-to-list 'load-path "~/.emacs.d/elisp")
+
+(require 'org-bullets)
+(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
+
+;; key shortcut for org-agenda
+(global-set-key (kbd "C-c a") 'org-agenda)
+
+(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.
+ '(package-selected-packages
+   (quote
+    (dumb-jump tangotango-theme restclient railscasts-theme racket-mode racer paredit notmuch markdown-mode magit leuven-theme ledger-mode hindent go-mode flycheck-rust flycheck-haskell fill-column-indicator company-racer color-theme-sanityinc-tomorrow auto-complete))))
+(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.
+ )
+
+(dumb-jump-mode)