Some recent emacs package that I started using: windmove, ido, elscreen, doremi, uniquefy, doc-view, window resize, eval-region

Emacs
Author

Vinh Nguyen

Published

August 2, 2009

Make sure tha path to the packages are added via add-to-list. Also, as mentioned in the previous post on debug, doremi and elscreen should be towards the beginning of .emacs. Doremi conflicts with multi-term: (require 'multi-term) (multi-term-keystroke-setup) (setq multi-term-program "/bin/bash")

Here is what i added (not necessarily in this order) to my .emacs file:

;; Do Re Mi
;; requires MANY files, see following path
;; http://www.emacswiki.org/emacs/WindowResize
;; http://www.emacswiki.org/emacs/DoReMi
;; I use doremi for frame resize. Had to uncomment the keybindings in doremi-frm.el file
;; to resize frame, do C-x t h, then use arrow keys to adjust. Use M- to get faster adjustments
(add-to-list 'load-path "~/elisp/doremi")
(require 'doremi)
(require 'doremi-frm)
;; to move entire frame, use C-x t x


;; following, resize active window when multiple windows are open (windows, not frame)
;; http://www.emacswiki.org/emacs/WindowResize
(global-set-key (kbd "S-M-") 'shrink-window-horizontally)
(global-set-key (kbd "S-M-") 'enlarge-window-horizontally)
(global-set-key (kbd "S-M-") 'shrink-window)
(global-set-key (kbd "S-M-") 'enlarge-window)



;; eval-region key binding
(global-set-key (kbd "C-x r") 'eval-region)


;; elscreen
;;http://www.morishima.net/~naoto/software/elscreen/
;;http://www.emacswiki.org/emacs/EmacsLispScreen
(add-to-list 'load-path "~/elisp/apel")
(add-to-list 'load-path "~/elisp/emu")
(setq elscreen-prefix-key [(control .)]) ;; must go before loading elscreen
(load "elscreen" "ElScreen" t)
;;(elscreen-set-prefix-key [(control .)]) ;; binding C-z to something else after elscreen is loaded
;; http://emacs-fu.blogspot.com/2009/07/keeping-related-buffers-together-with.html
(global-set-key (kbd "" ) 'elscreen-create)
(global-set-key (kbd "S-" ) 'elscreen-kill)
(global-set-key (kbd "C-") 'elscreen-next);
(global-set-key (kbd "C-S-") 'elscreen-previous);


;; windmove
;; move between windows easily (instead of C-x o)
;; http://emacs-fu.blogspot.com/2008/12/easy-switching-between-visible-buffers.html
(require 'windmove)
(windmove-default-keybindings 'super)
;; now try apple + up (and different direction)

;; Switching buffers
;; iswitchb
;; Takes over C-x b -- do this, type in substring of buffer name, enter to select; C-s and C-r to move items to first place
;;(iswitchb-mode t) ;; not using this anymore as i-do does it (look at next)
;; M-x iswitchb-mode to turn on and off

;; Switching buffers and finding files with C-x C-f
;; http://emacs-fu.blogspot.com/2009/02/switching-buffers.html
;; http://www.emacswiki.org/cgi-bin/wiki/InteractivelyDoThings
(require 'ido)
(ido-mode t)
(setq ido-enable-flex-matching t) ;;fuzzy matching, eg, mef would match my_emacs_file
(setq ido-create-new-buffer 'always)



;; Copying lines from this point to end (instead of killing, C-k)
;; Use C-c C-k
;; http://www.emacsblog.org/2009/05/18/copying-lines-not-killing/
(defun copy-line (&optional arg)
"Do a kill-line but copy rather than kill. This function directly calls
kill-line, so see documentation of kill-line for how to use it including prefix
argument and relevant variables. This function works by temporarily making the
buffer read-only, so I suggest setting kill-read-only-ok to t."
(interactive "P")
(toggle-read-only 1)
(kill-line arg)
(toggle-read-only 0))

(setq-default kill-read-only-ok t)
(global-set-key "\C-c\C-k" 'copy-line)

;; when u have 2 buffers with same name, eg, ~/.emacs, ~/backup/.emacs
(require 'uniquify)
(setq uniquify-buffer-name-style 'reverse)
(setq uniquify-separator "/")
(setq uniquify-after-kill-buffer-p t)
(setq uniquify-ignore-buffers-re "\^\\*")



;; docview in Emacs 23
;; open pdf/ps in emacs by conversion to png
(require 'doc-view)