           (set-visited-file-name new-name)
           (set-buffer-modified-p nil))))))
 
-;; source: https://www.emacswiki.org/emacs/SearchBuffers#toc10
-(defun search-all-buffers (regexp)
-   (interactive "sRegexp: ")
-   (multi-occur-in-matching-buffers "^[^\*]" regexp t))
 
-;; Install IBuffer
-(global-set-key (kbd "C-x C-b") 'ibuffer)
-(autoload 'ibuffer "ibuffer" "List buffers." t)
-(setq ibuffer-formats
-      '((mark modified read-only " "
-              (name 40 40 :left :elide) " "
-              (size 9 -1 :right) " "
-              (mode 16 16 :left :elide) " " filename-and-process)
-        (mark " " (name 16 -1) " " filename)))
-
-(fset 'show-ibuffer
-   "\C-x\C-b")
-(global-set-key (kbd "C-c b") 'show-ibuffer)
+;; CUSTOM EDITING FUNCTIONS ;;
 
 (defun delete-horizontal-space-across-lines ()
   "Like delete-horizontal-space but works across newlines."

	     '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)

; Basic stuff
(menu-bar-mode -1)
(global-auto-revert-mode t)
(xterm-mouse-mode)
(setq visible-bell 1)

(ffap-bindings)

; Shortcuts
(fset 'gb 'recompile)

; Golang stuff
(defun my-go-mode-hook ()
  (add-hook 'before-save-hook 'gofmt-before-save)
  (if (not (string-match "go" compile-command))
      (set (make-local-variable 'compile-command)
	   "go build -v && go test -v && go vet"))
  (local-set-key (kbd "M-.") 'godef-jump))
(add-hook 'go-mode-hook 'my-go-mode-hook)

; http://www.emacswiki.org/emacs/TransposeWindows
(defun transpose-windows (arg)
   "Transpose the buffers shown in two windows."

                (set-window-buffer (windmove-find-other-window neighbour-dir) other-buf))))))))
(define-key ctl-x-4-map (kbd "y") 'window-toggle-split-direction)

; Rename file and buffer
; http://steve.yegge.googlepages.com/my-dot-emacs-file
(defun rename-file-and-buffer (new-name)
  "Renames both current buffer and file it's visiting to NEW-NAME."
  (interactive "sNew name: ")
