Skip to content

Instantly share code, notes, and snippets.

@pvieytes
Created January 23, 2012 15:46
Show Gist options
  • Select an option

  • Save pvieytes/1663892 to your computer and use it in GitHub Desktop.

Select an option

Save pvieytes/1663892 to your computer and use it in GitHub Desktop.

Revisions

  1. pvieytes renamed this gist Jan 23, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. pvieytes renamed this gist Jan 23, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. pvieytes created this gist Jan 23, 2012.
    20 changes: 20 additions & 0 deletions .emacs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    ;;to-line short-cut key
    (global-set-key "\C-l" 'goto-line)
    ;;M-g-g does the same

    ;; Wheel mouse + Control change buffer we are looking at
    (defun next-buffer ()
    "Go to the buffer which is at the end of the buffer-list.
    This is the symmetric of burry-buffer."
    (interactive)
    (switch-to-buffer (nth (- (length (buffer-list)) 1) (buffer-list))))

    (define-key global-map [(control mouse-4)] 'next-buffer)
    (define-key global-map [(control mouse-5)] 'bury-buffer)

    ;; Home and End selects buffer
    (global-set-key [C-home] 'next-buffer)
    (global-set-key [C-end] 'bury-buffer)

    ;; Disable binding of C-z to iconify a window.
    (global-unset-key "\C-z")