 (setq-default javascript-indent-level 2)
 (setq-default js-indent-level 2)
 (setq-default scala-indent-level 2)
-
 (custom-set-variables
   '(python-guess-indent nil)
   '(python-indent 2))
 
+;; auto complete
+(setq-default completion-ignore-case t)
+(setq-default pcomplete-ignore-case t)
+
+;; disable shell echo
+(setq comint-process-echoes t)
+(put 'erase-buffer 'disabled nil)
+
+;; packages
+(defun install-package (x)
+  (when (not (package-installed-p x)) (package-install x)))
+
+(require 'package)
+(add-to-list 'package-archives
+             '("melpa" . "http://melpa.milkbox.net/packages/") t)
+(package-initialize)
+(install-package 'rust-mode)
+(install-package 'scala-mode2)
+(install-package 'magit)
+(install-package 'git-commit-mode)
+(install-package 'git-rebase-mode)
+
+;; shell
 (defun shell-named (name)
   (shell)
   (rename-buffer name)

     (if (get-buffer ,name) (switch-to-buffer ,name)
       (shell-named ,name))))

(defmacro hot-file (name)
  `(lambda () (interactive) (find-file ,name)))

(defmacro hot-buffer (name)
  `(lambda () (interactive) (switch-to-buffer ,name)))

(defmacro hot-text (x)
  `(lambda () (interactive) (insert ,x)))

(global-set-key [(meta ?1)] (hot-shell "*shell1*"))
(global-set-key [(meta ?2)] (hot-shell "*shell2*"))

;; indentation
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
(setq-default py-indent-offset 2)
