What a beautiful modification of forward word and backward-word movement for Emacs.
I have just became a huge fan of it.
(defun geosoft-forward-word ()
;; Move one word forward. Leave the pointer at start of word
;; instead of emacs default end of word. Treat _ as part of word
(interactive)
(forward-char 1)
(backward-word 1)
(forward-word 2)
(backward-word 1)
(backward-char 1)
(cond ((looking-at "_") (forward-char 1) (geosoft-forward-word))
(t (forward-char 1))))
(defun geosoft-backward-word ()
;; Move one word backward. Leave the pointer at start of word
;; Treat _ as part of word
(interactive)
(backward-word 1)
(backward-char 1)
(cond ((looking-at "_") (geosoft-backward-word))
(t (forward-char 1))))
(global-set-key "\M-f" 'geosoft-forward-word)
(global-set-key "\M-b" 'geosoft-backward-word)
Another macro is another Gem:
(defvar LIMIT 1)
(defvar time 0)
(defvar mylist nil)
(defun time-now ()
(car (cdr (current-time))))
(defun bubble-buffer ()
(interactive)
(if (or (> (- (time-now) time) LIMIT) (null mylist))
(progn (setq mylist (copy-alist (buffer-list)))
(delq (get-buffer " *Minibuf-0*") mylist)
(delq (get-buffer " *Minibuf-1*") mylist)))
(bury-buffer (car mylist))
(setq mylist (cdr mylist))
(setq newtop (car mylist))
(switch-to-buffer (car mylist))
(setq rest (cdr (copy-alist mylist)))
(while rest
(bury-buffer (car rest))
(setq rest (cdr rest)))
(setq time (time-now)))
(global-set-key [f6] 'bubble-buffer)
Just trying setting them up in your .emacs file and you are ready to rock.
Another excellent package for those who long for visual bookmarking in emacs is package called visual bookmark.
Boy..i guess i am gonna dump...Arachno Ruby IDE completely now.